ostore.apps.qtree.api
Class QTreeStateMsg

java.lang.Object
  |
  +--ostore.network.NetworkMessage
        |
        +--ostore.apps.qtree.api.QTreeStateMsg
All Implemented Interfaces:
Cloneable, QueueElementIF, QuickSerializable

public class QTreeStateMsg
extends NetworkMessage

Generic message used to handle tree (de)construction.

Author:
Jason Lee

Field Summary
static int ACK
           
static int CLOSE
           
static int CONNECTION
           
protected  boolean delay_build
           
protected  int req_state
           
protected  SecureHash root_guid
           
protected  NodeId root_node
           
 
Fields inherited from class ostore.network.NetworkMessage
comp_q, est_rtt_ms, inbound, peer, sender, tries, user_data, wait_ms
 
Constructor Summary
QTreeStateMsg(InputBuffer buffer)
           
QTreeStateMsg(NodeId peer, boolean inbound, int request, NodeId root, boolean delay)
           
QTreeStateMsg(NodeId peer, boolean inbound, int request, SecureHash root, boolean delay)
           
QTreeStateMsg(QTreeStateLocal loc)
           
 
Method Summary
 SecureHash getGuid()
           
 NodeId getRootNode()
           
 int getState()
           
 boolean isDelayed()
           
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
           
 
Methods inherited from class ostore.network.NetworkMessage
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

root_node

protected NodeId root_node

root_guid

protected SecureHash root_guid

req_state

protected int req_state

CONNECTION

public static final int CONNECTION
See Also:
Constant Field Values

CLOSE

public static final int CLOSE
See Also:
Constant Field Values

ACK

public static final int ACK
See Also:
Constant Field Values

delay_build

protected boolean delay_build
Constructor Detail

QTreeStateMsg

public QTreeStateMsg(NodeId peer,
                     boolean inbound,
                     int request,
                     NodeId root,
                     boolean delay)

QTreeStateMsg

public QTreeStateMsg(NodeId peer,
                     boolean inbound,
                     int request,
                     SecureHash root,
                     boolean delay)

QTreeStateMsg

public QTreeStateMsg(QTreeStateLocal loc)

QTreeStateMsg

public QTreeStateMsg(InputBuffer buffer)
              throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class NetworkMessage
Parameters:
buffer - the output buffer to add the object to

toString

public String toString()
Overrides:
toString in class NetworkMessage

getGuid

public SecureHash getGuid()

getRootNode

public NodeId getRootNode()

getState

public int getState()

isDelayed

public boolean isDelayed()