public abstract class RQMessage extends RequestMessage
this class contains various data that are required to be transmitted to the
target nodes. this class also contains failedLinks field, which
represents a set of failed nodes that are found while processing the range
query.
this class also manages (partial) results returned from child nodes (
rqRet).
| 修飾子とタイプ | フィールドと説明 |
|---|---|
Set<Endpoint> |
failedLinks
failed links. this field is used for avoiding and repairing dead links.
|
int |
hops
hop counter for gathering statistics
|
QueryId |
qid
query id
|
Object |
query |
RQReturn |
rqRet |
Collection<SubRange> |
subRanges
subranges, split by the range query algorithm
|
protected Collection<SubRange> |
targetRanges
the target ranges, that is not modified
|
ackReceived, ackSent, isRecvdInstance, isRoot, msgframe, msgId, opts, readyToReceive, receiver, replyId, replySent, replyTo, sender, timeoutTask, timestamp| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
RQMessage(MessagingFramework msgframe,
boolean isRoot,
Endpoint replyTo,
int replyId,
Collection<SubRange> subRanges,
QueryId qid,
Object query,
int hops,
TransOptions opts)
create an instance of RQMessage.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addFailedLinks(Collection<Endpoint> links) |
Collection<SubRange> |
adjustSubRangesForRetrans(Collection<SubRange> subRanges) |
protected abstract RQMessage |
createInstance(MessagingFramework sgmf,
boolean isRoot,
Endpoint replyTo,
int replyId,
Collection<SubRange> subRanges,
TransOptions opts) |
Object |
getQuery() |
abstract RQAlgorithm |
getRangeQueryAlgorithm() |
Collection<SubRange> |
getTargetRanges() |
RQMessage |
newChildInstance(Collection<SubRange> newSubRange)
create a child RQMessage from this instance.
|
RQMessage |
newChildInstance(Collection<SubRange> newSubRange,
boolean newIsRoot)
create a child RQMessage from this instance.
|
abstract RQReplyMessage |
newRQReplyMessage(Collection<DKRangeRValue<?>> vals,
boolean isFinal,
Collection<MessagePath> paths,
int hops) |
boolean |
onReceivingReply(ReplyMessage reply0)
this method is called when a reply message is received at the sender
node.
|
void |
onResponseTimeout()
this method is called when the response message (ack/reply) for this
message is timed-out.
|
String |
shortName() |
String |
toString() |
dispose, execute, getManager, isAckTimedOut, mayReceiveReply, newAckMessage, responseReceived, send, sendAckprotected final Collection<SubRange> targetRanges
public Collection<SubRange> subRanges
public final QueryId qid
public final Object query
public final int hops
public transient RQReturn rqRet
protected RQMessage(MessagingFramework msgframe, boolean isRoot, Endpoint replyTo, int replyId, Collection<SubRange> subRanges, QueryId qid, Object query, int hops, TransOptions opts)
msgframe - the MessagingFramework instance managing this messageisRoot - true if this instance is used at the root nodereplyTo - the node that the reply message for this message should be
sent toreplyId - the ID to distinguish queries at the replyTo nodesubRanges - set of query rangesqid - QueryId to uniquely distinguish this messagequery - an object sent to all the nodes within the query rangeshops - a hop count from the root nodeopts - the transport options.protected abstract RQMessage createInstance(MessagingFramework sgmf, boolean isRoot, Endpoint replyTo, int replyId, Collection<SubRange> subRanges, TransOptions opts)
public abstract RQAlgorithm getRangeQueryAlgorithm()
public RQMessage newChildInstance(Collection<SubRange> newSubRange)
this method is used at intermediate nodes.
newSubRange - new subrange for the child RQMessagepublic RQMessage newChildInstance(Collection<SubRange> newSubRange, boolean newIsRoot)
this method is used both at intermediate nodes and at root node (in slow retransmission case)
newSubRange - new subrange for the child RQMessagenewIsRoot - true if you want a root messagepublic String shortName()
public void addFailedLinks(Collection<Endpoint> links)
public Collection<SubRange> getTargetRanges()
public Object getQuery()
public boolean onReceivingReply(ReplyMessage reply0)
RequestMessageonReceivingReply クラス内 RequestMessagereply0 - the reply messagepublic void onResponseTimeout()
RequestMessageonResponseTimeout クラス内 RequestMessagepublic Collection<SubRange> adjustSubRangesForRetrans(Collection<SubRange> subRanges)
public abstract RQReplyMessage newRQReplyMessage(Collection<DKRangeRValue<?>> vals, boolean isFinal, Collection<MessagePath> paths, int hops)
Copyright © 2017. All rights reserved.