|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.dtree.DTreeReq | +--ostore.dtree.DTreeServiceReq
Messages sent from a child node to a parent node, or vice versa, asking the receiver to initiate, modify, or terminate dissemination service.
Field Summary | |
---|---|
protected long |
bid
The sender's priority/bid for this request. |
protected long |
lease
The number of bytes that the parent must send under the new service agreement. |
protected Double |
max_distance
The maximum acceptable distance (latency, in ms) from the sender to the root of the tree. |
static long |
PARENTAL_ORDER
The only value of bid if the sender is the parent node. |
protected int |
requested_state
The connection state that the sender wants. |
protected SecureHash |
sender
The sender's GUID. |
static int |
STATE_DESTROYED
Denotes the destruction of the tree. |
static int |
STATE_DISCONNECTED
Denotes the state in which nothing is forwarded to the child - the parent is free to forget the child. |
static int |
STATE_FULLY_CONNECTED
Denotes the state in which all messages are forwarded to the child. |
static int |
STATE_INVALIDATIONS_ONLY
Denotes the state in which only heartbeats are forwarded to the child. |
Fields inherited from class ostore.dtree.DTreeReq |
---|
digest, tree_id |
Constructor Summary | |
---|---|
DTreeServiceReq(InputBuffer buffer)
Constructs a DTreeServiceReq from its
serialize d form. |
|
DTreeServiceReq(SecureHash tree_id,
SecureHash sender,
int requested_state,
long bid,
long lease,
Double max_distance)
Creates a new request for the specified tree. |
Method Summary | |
---|---|
long |
get_bid()
Returns the sender's priority/bid for this request. |
long |
get_lease()
Returns the number of bytes that the parent must send under this service agreement. |
Double |
get_max_distance()
Returns the maximum acceptable distance from the sender to the root of tree. |
int |
get_requested_state()
Returns the connection state that the sender wants. |
SecureHash |
get_sender()
Returns the sender's GUID. |
void |
serialize(OutputBuffer buffer)
Add the object to the buffer . |
String |
toString()
Returns a human-readable representation of this DTreeServiceReq . |
Methods inherited from class ostore.dtree.DTreeReq |
---|
get_digest, get_seq_num, get_tree_id, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int STATE_FULLY_CONNECTED
public static final int STATE_INVALIDATIONS_ONLY
public static final int STATE_DISCONNECTED
public static final int STATE_DESTROYED
public static final long PARENTAL_ORDER
bid
if the sender is the parent node.
protected SecureHash sender
protected int requested_state
protected long bid
PARENTAL_ORDER
.
protected long lease
STATE_DISCONNECTED
.
protected Double max_distance
null
. The join request should be rejected if the distance from the sender to the receiver plus the distance from the receiver to the root is greater than this threshold.
Constructor Detail |
public DTreeServiceReq(SecureHash tree_id, SecureHash sender, int requested_state, long bid, long lease, Double max_distance)
tree_id
- the A-GUID for the tree's data object.sender
- the sender's GUID.requested_state
- The connection state that the sender wantsbid
- The sender's priority/bid for this request.lease
- The number of bytes that the parent must send.max_distance
- The maximum acceptable distance to the root.public DTreeServiceReq(InputBuffer buffer) throws QSException
DTreeServiceReq
from its
serialize
d form.
Method Detail |
public SecureHash get_sender()
public int get_requested_state()
public long get_bid()
PARENTAL_ORDER
.
public long get_lease()
public Double get_max_distance()
public void serialize(OutputBuffer buffer)
QuickSerializable
buffer
.
serialize
in interface QuickSerializable
serialize
in class DTreeReq
buffer
- the output buffer to add the object topublic String toString()
DTreeServiceReq
.
toString
in class DTreeReq
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |