ostore.tapestry.api
Class TapestryLocateMsg

java.lang.Object
  |
  +--ostore.tapestry.api.TapestryLocateMsg
All Implemented Interfaces:
QueueElementIF, QuickSerializable
Direct Known Subclasses:
RMLocateMsg, SimulatedRead, TestLocateMsg

public abstract class TapestryLocateMsg
extends Object
implements QueueElementIF, QuickSerializable

Messages sent from one OceanStore machine to one or more machines avertising the given GUID and satisfying the given tag query. The intended functionality of this event (outgoing) is as follows. The message is routed toward the given guid in the Tapestry mesh, and at each hop the query is applied to any backpointers associated with the given GUID, along with the current query_state. The query should return a result, and possibly modify the query state as well. The result can be one of TapestryQueryResultMatch or TapestryQueryResultNoMatch. A matching result indicates which backpointers to follow, as well as whether or not to continue up the tree. A non-matching result causes the query to continue towards the root without following any backpointers.


Field Summary
 SecureHash guid
          The queried GUID.
 int hopCount
          Number of hops taken by the message on its way to the application
 SecureHash id
          A unique ID for this message, in order that a TapestryLocateFailure can be matched to the location request; set to null if you do not want failure notification.
 boolean inbound
          Whether this message is being received (true) or sent (false).
 int local_opts
          A bitmask indicating which local optimizations to use.
 SecureHash peer
          If inbound, the sender; undefined otherwise.
 int qos
          The delivery qos of this msg, added by Ling Huang
 TapestryQuery query
          The query to execute on each backpointer.
 TapestryQueryState query_state
          The state to pass the query executed on each backpointer.
 int TTL
          Number of hops this message should take before delivering payload.
 
Constructor Summary
TapestryLocateMsg()
          Empty constructor.
TapestryLocateMsg(SecureHash guid, TapestryQuery query, TapestryQueryState query_state, SecureHash id)
          Construct with the given guid, query, and state; will return a TapestryLocateFailure with the same id if the location fails.
 
Method Summary
 void setLocalOptLocalMisroute()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ostore.util.QuickSerializable
serialize
 

Field Detail

peer

public SecureHash peer
If inbound, the sender; undefined otherwise.

inbound

public boolean inbound
Whether this message is being received (true) or sent (false).

guid

public SecureHash guid
The queried GUID.

query

public TapestryQuery query
The query to execute on each backpointer. See the class comments, above.

query_state

public TapestryQueryState query_state
The state to pass the query executed on each backpointer. See the class comments, above.

hopCount

public int hopCount
Number of hops taken by the message on its way to the application

TTL

public int TTL
Number of hops this message should take before delivering payload.

id

public SecureHash id
A unique ID for this message, in order that a TapestryLocateFailure can be matched to the location request; set to null if you do not want failure notification.

qos

public int qos
The delivery qos of this msg, added by Ling Huang

local_opts

public int local_opts
A bitmask indicating which local optimizations to use. Bits indicate the following optimizations, from least significant bit to most significant bit: Bit 3) Before leaving a LAN, misroute and try to locate. Note: "a few hops" is defined by Router.LOCAL_OPT_HOPS
Constructor Detail

TapestryLocateMsg

public TapestryLocateMsg(SecureHash guid,
                         TapestryQuery query,
                         TapestryQueryState query_state,
                         SecureHash id)
Construct with the given guid, query, and state; will return a TapestryLocateFailure with the same id if the location fails. Set id to null if a failure respons is not needed. Use for new outbound messages.

TapestryLocateMsg

public TapestryLocateMsg()
Empty constructor. For use by derived types when reconstructing themselves from a byte array.
Method Detail

setLocalOptLocalMisroute

public void setLocalOptLocalMisroute()