dd.host.impl
Class HostHbStage.HostDbReq

java.lang.Object
  |
  +--ostore.network.NetworkMessage
        |
        +--dd.host.impl.HostHbStage.HostDbReq
All Implemented Interfaces:
Cloneable, QueueElementIF, QuickSerializable
Enclosing class:
HostHbStage

public static class HostHbStage.HostDbReq
extends NetworkMessage

HostDbReq/HostHbStage.HostDbResp are used to tranfer the contents of the HostDb from an older leaf set member to a new node. The older leafset members HostDb is entirely a hint and is used to initialize a new nodes HostDb as a way to bootstrap the new node into the network. The hint is useful by giving the new node a notion of the state of the network.


Field Summary
static byte CONT
          Continue transfering host entries.
 SecureHash dest
          identifier of the src and dest.
 short maxReturn
          Max num of host entries to return in resp
 short seq
          A sequence number to keep track of position of transfer.
 SecureHash src
          identifier of the src and dest.
static byte START
          Start transfering host entries.
 byte state
          state indicating whether to START, CONT, or STOP.
static byte STOP
          Stop transfering host entries.
 
Fields inherited from class ostore.network.NetworkMessage
comp_q, est_rtt_ms, inbound, peer, sender, tries, user_data, wait_ms
 
Constructor Summary
HostHbStage.HostDbReq(InputBuffer buffer)
          Constructs a HostDbReq from its serialized form.
HostHbStage.HostDbReq(NodeId peer, SecureHash src, SecureHash dest, short seq, short maxReturn, byte state)
          Construct according to the given fields.
 
Method Summary
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 String toString()
          Specified by java.lang.Object
 
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

START

public static final byte START
Start transfering host entries.

See Also:
Constant Field Values

CONT

public static final byte CONT
Continue transfering host entries.

See Also:
Constant Field Values

STOP

public static final byte STOP
Stop transfering host entries.

See Also:
Constant Field Values

src

public SecureHash src
identifier of the src and dest.


dest

public SecureHash dest
identifier of the src and dest.


maxReturn

public short maxReturn
Max num of host entries to return in resp


state

public byte state
state indicating whether to START, CONT, or STOP.


seq

public short seq
A sequence number to keep track of position of transfer.

Constructor Detail

HostHbStage.HostDbReq

public HostHbStage.HostDbReq(NodeId peer,
                             SecureHash src,
                             SecureHash dest,
                             short seq,
                             short maxReturn,
                             byte state)
Construct according to the given fields.


HostHbStage.HostDbReq

public HostHbStage.HostDbReq(InputBuffer buffer)
                      throws QSException
Constructs a HostDbReq from its serialized form.

Parameters:
buffer - serialized form of object.
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class NetworkMessage

toString

public String toString()
Specified by java.lang.Object

Overrides:
toString in class NetworkMessage