ostore.tapestry.api
Class TapestryLocateMsg

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

public abstract class TapestryLocateMsg
extends Object
implements QueueElementIF, Digestible

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.
 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).
 SecureHash peer
          If inbound, the sender; undefined otherwise.
 TapestryQuery query
          The query to execute on each backpointer.
 TapestryQueryState query_state
          The state to pass the query executed on each backpointer.
 
Constructor Summary
TapestryLocateMsg()
          Empty constructor.
TapestryLocateMsg(SecureHash guid, TapestryQuery query, TapestryQueryState query_state)
          Construct with the given guid, query, and state; will not return a TapestryLocateFailure if the location fails.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ostore.util.Digestible
add_to_digest
 
Methods inherited from interface ostore.util.QuickSerializable
to_bytes, type_code
 

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.

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.
Constructor Detail

TapestryLocateMsg

public TapestryLocateMsg(SecureHash guid,
                         TapestryQuery query,
                         TapestryQueryState query_state)
Construct with the given guid, query, and state; will not return a TapestryLocateFailure if the location fails. Use for new outbound messages.

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. Use for new outbound messages.

TapestryLocateMsg

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