|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dd.api.DDRouteMsg
Messages sent from one machine to any other. To send a message from one OceanStore machine to any other, one simply inherits from this class, filling in the proper serialization code for the inherited class's data. (The DD stage will take care of the fields in this class itself.)
Implementation-wise, this is simply a route-to-root operation.
Field Summary | |
---|---|
boolean |
dd_intermediate_upcall
If true , the underlying DHT will generate an upcall event
to the DD on each intermediate node in the path. |
int |
hopCount
Number of hops taken by the message on its way to the application. |
boolean |
inbound
Whether this message is being received ( true ) or sent
(false ). |
boolean |
one_hop
One hop is a (possible) optimization. |
SecureHash |
peer
If inbound , the sender; if ! |
boolean |
recursive_route
If true recursive route between src and dest;
otherwise, iterative route. |
int |
TTL
Number of hops this message should take before delivering payload. |
Constructor Summary | |
---|---|
protected |
DDRouteMsg()
Empty constructor. |
protected |
DDRouteMsg(InputBuffer buffer)
Constructs a DDRouteMsg from its
serialized form. |
protected |
DDRouteMsg(SecureHash peer,
boolean recursive_route,
boolean dd_intermediate_upcall,
boolean one_hop)
Constructor: Creates a new DDRouteMsg .
|
Method Summary | |
---|---|
void |
serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public SecureHash peer
inbound
, the sender; if ! inbound
the
intended recipient.
public boolean inbound
true
) or sent
(false
).
public boolean recursive_route
true
recursive
route between src and dest;
otherwise, iterative
route. Recursive route
means that each node in the path forwards the message to the next
node. The recursive route continues until the message reaches the dest.
Whereas, iterative route means each node in the path sends
back to the source the next node and the source itself sends the
message to the next node. The iterative route continues until the
message reaches the dest.
public boolean dd_intermediate_upcall
true
, the underlying DHT will generate an upcall event
to the DD on each intermediate node in the path. Otherwise,
the underlying DHT will send the message directly to the dest.
dd_intermediate_upcall==true
is necessary for
hopCount
and TTL
to be accounted for
correctly; otherwise, the values are undefined.
public boolean one_hop
host
db
,
it is possible to look up the peer
entry in the the
db
. If an entry exists, the
can forward the message directly to the peer
in one hop.
public int hopCount
public int TTL
Constructor Detail |
protected DDRouteMsg(SecureHash peer, boolean recursive_route, boolean dd_intermediate_upcall, boolean one_hop)
DDRouteMsg
.
Use for new outbound messages.
An example parameter setting to account for hopCount
and TTL
:
Another example parameter setting to route as quickly as possible where
for hopCount
and TTL
do not matter:
peer
- target destination node guid
.recursive_route
- If true
recursive
route
between src and dest; otherwise, iterative
route. See
recursive_route
for more details.dd_intermediate_upcall
- If true
, the underlying DHT
will generate an upcall event to the DD on each intermediate node
in the path. Otherwise, the underlying DHT will send the message
directly to the dest. dd_intermediate_upcall==true
is
necessary for hopCount
and TTL
to be accounted for
correctly; otherwise, the values are undefined.one_hop
- One hop is a (possible) optimization. Since the DD
maintains a host
db
, it is possible to look up
the peer
entry in the the
db
. If an entry exists, the
can forward the message directly to the peer
in one hop.protected DDRouteMsg()
protected DDRouteMsg(InputBuffer buffer)
DDRouteMsg
from its
serialized
form.
buffer
- serialized
form of object.Method Detail |
public void serialize(OutputBuffer buffer)
serialize
in interface QuickSerializable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |