ostore.network.patchwork
Class QuickStatReq

java.lang.Object
  |
  +--ostore.network.patchwork.QuickStatReq
All Implemented Interfaces:
PatchMsg, QueueElementIF

public final class QuickStatReq
extends Object
implements QueueElementIF, PatchMsg

A QuickStatReq event can be sent by any stage to the Patchwork stage. It triggers the measurement of a set of nodes, but only for a small amount of time. After that amount of time has passed, a QuickStatResp is sent back with the results of the measurements.

Version:
$Id: QuickStatReq.java,v 1.6 2003/05/08 01:55:05 strib Exp $
Author:
Jeremy Stribling

Field Summary
protected  int how_many_done
           
 boolean just_once
           
 NodeId[] peers
           
 SinkIF sink
           
 long time_to_resp
          When the response will be generated (in ms), default 1 sec
 byte type
           
 Object userData
           
protected  boolean[] which_done
           
 
Constructor Summary
QuickStatReq(NodeId[] peers, byte type, long timeToResp, Object userData, SinkIF sink)
          Construct a new QuickStatReq.
QuickStatReq(NodeId[] peers, byte type, Object userData, SinkIF sink)
          Construct a new QuickStatReq.
QuickStatReq(NodeId peer, byte type, long timeToResp, Object userData, SinkIF sink)
          Construct a new QuickStatReq.
QuickStatReq(NodeId peer, byte type, Object userData, SinkIF sink)
          Construct a new QuickStatReq.
 
Method Summary
 Object clone()
           
 byte getType()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public byte type

peers

public NodeId[] peers

userData

public Object userData

sink

public SinkIF sink

just_once

public boolean just_once

how_many_done

protected int how_many_done

which_done

protected boolean[] which_done

time_to_resp

public long time_to_resp
When the response will be generated (in ms), default 1 sec
Constructor Detail

QuickStatReq

public QuickStatReq(NodeId peer,
                    byte type,
                    Object userData,
                    SinkIF sink)
Construct a new QuickStatReq.
Parameters:
peer - The node to measure quickly
type - What type of measurement to make (see Patch for valid types.

QuickStatReq

public QuickStatReq(NodeId[] peers,
                    byte type,
                    Object userData,
                    SinkIF sink)
Construct a new QuickStatReq.
Parameters:
peers - The nodes to measure quickly
type - What type of measurement to make (see Patch for valid types.

QuickStatReq

public QuickStatReq(NodeId peer,
                    byte type,
                    long timeToResp,
                    Object userData,
                    SinkIF sink)
Construct a new QuickStatReq.
Parameters:
peer - The node to measure quickly
type - What type of measurement to make (see Patch for valid types.
timeToResp - How to long to perform the measurement for (in ms)

QuickStatReq

public QuickStatReq(NodeId[] peers,
                    byte type,
                    long timeToResp,
                    Object userData,
                    SinkIF sink)
Construct a new QuickStatReq.
Parameters:
peers - The nodes to measure quickly
type - What type of measurement to make (see Patch for valid types.
timeToResp - How to long to perform the measurement for
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object

getType

public byte getType()
Specified by:
getType in interface PatchMsg

toString

public String toString()
Overrides:
toString in class Object