E - the type of Endpoint in the underlying network.public class RQManager<E extends Endpoint> extends RingManager<E> implements RQIf<E>
RingManager.ExecQueryReturn, RingManager.LinkContainer, RingManager.RightNodeMismatchRPCInvoker.MethodCall| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected RQExecQueryCallback |
execQueryCallback |
static int |
FIND_INSERT_POINT_TIMEOUT
|
Link |
FIXLEFT
pseudo Link instance that represents the link should be fixed
|
protected static UniqId |
FIXPEERID
pseudo PeerID used by
rqDisseminate(RQMessage, NavigableMap) |
static boolean |
NEWALGORITHM |
static int |
QID_EXPIRATION_TASK_PERIOD
period for executing a task for purging stale QueryIDs
|
static int |
QID_EXPIRE
expiration time for purging stale QueryIDs
|
static String |
QUERY_INSERT_POINT_SPECIAL
used as the query string for finding insert points.
|
static String |
QUERY_KEY_SPECIAL |
static int |
RQ_EXPIRATION_GRACE
additional grace time before removing RQReturn in intermediate nodes
|
static int |
RQ_FLUSH_PERIOD
the period for flushing partial results in intermediate nodes
|
static int |
RQ_NRECENT
Range Queryでトラバース中に通信エラーが起きた場合に戻れるノード数
|
static ObjectId |
RQ_QUERY_AT_FIND |
static int |
RQ_RETRANS_PERIOD
range query retransmission period
|
DDLL_CHECK_PERIOD_L0, DEFAULT_TRANSPORT_ID, keyComp, keyHash, manager, msgframe, myLocator, peerId, rand, RPC_TIMEOUT, statman, transIdchannelPool, isActive, objId, POOL_CHANNEL, POOL_CHANNEL_SIZE, trans, USE_CHANNEL_FOR_ONEWAY| コンストラクタと説明 |
|---|
RQManager(TransportId transId,
ChannelTransport<E> trans,
RQExecQueryCallback execQueryCallback) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static SubRange |
convertToSubRange(Range<? extends Comparable<?>> range) |
RemoteValue<?> |
execQuery(Comparable<?> key,
Object query)
Range Query実行時に呼び出されるメソッド.
|
Node.InsertPoint |
findImmedNeighbors(E introducer,
DdllKey key,
Object query,
TransOptions opts)
find a location to insert `key'.
|
List<RemoteValue<?>> |
forwardQuery(boolean isPlusDir,
Range<?> range,
int maxNum,
Object query,
TransOptions opts)
指定されたkeyとNavigableCondの条件を満たすキーを持つピア(最大num個)にクエリを転送し、
得られた結果(リスト)を返す。
|
RQIf<E> |
getStub(E addr,
int rpcTimeout)
リモートピア上のこのオブジェクトに対応するRPCInvokerオブジェクトのメソッドを呼び出すためのstubを返す。
|
RQIf<E> |
getStub(Endpoint dst)
リモートピア上のこのオブジェクトに対応するRPCInvokerオブジェクトのメソッドを
呼び出すためのstubを返す。
|
RQVNode<E> |
getVNode(Comparable<?> rawkey)
get RingVNode instance (for debugging only)
|
RingManager.ExecQueryReturn |
invokeExecQuery(Comparable<?> rawkey,
Link curRight,
QueryId qid,
boolean doAction,
Object query,
TransOptions opts)
Range Query実行時にRPCで呼び出されるメソッド.
|
protected boolean |
preferDelegateNodeLeftSide() |
void |
rqDisseminate(RQMessage msg) |
void |
rqDisseminate(RQMessage msg,
NavigableMap<DdllKey,Link> allLinks) |
protected List<SubRange> |
rqSplit(Object query,
SubRange range0,
NavigableMap<DdllKey,Link> allLinks,
Collection<Endpoint> failedLinks,
List<DKRangeRValue<?>> rvals,
RQAlgorithm rqAlgo)
Split a range into subranges, by the keys in allLinks.
|
protected RQReturn |
rqStartRawRange(Collection<? extends Range<?>> ranges,
Object query,
TransOptions opts,
int retransPeriod,
NavigableMap<DdllKey,Link> allLinks,
RQAlgorithm rqAlgo)
perform a range query (internal).
|
RQResults |
scalableRangeQueryPro(Collection<? extends Range<?>> ranges,
Object query,
TransOptions opts) |
protected void |
setRQAlgorithm(RQAlgorithm algo) |
ackReceived, addKey, addKey, addKey, allValidVNodes, allVNodes, checkLocked, fin, find, findLeftLink, fixRoutingTables, getAvailableLinks, getClosestLinks, getLocalLinks, getPeerId, getRequestMessageById, isActive, newCondition, newVNode, offline, online, removeKey, replyMsgReceived, requestMsgReceived, rtLockR, rtLockW, rtUnlockR, rtUnlockW, schedule, schedule, schedule, schedule, showTable, toString, toStringShortchangeRPCTimeout, changeTransport, checkActive, getEndpoint, getRPCObject, getSrcPeerId, getStub, getStub, getStub, getStub, getStub, getStub, getStub, getStub, getTransport, invokeInReceive, isOnline, newMethodCall, rcall, rcall, rcall, rcall, rcall, rcall, rcall, rcall, receiveOneway, receiveSync, registerRPCObject, sendInvoke, sendOnewayInvoke, unregisterRPCObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitackReceived, getClosestLinks, getLocalLinks, replyMsgReceived, requestMsgReceivedpublic static int QID_EXPIRE
public static int QID_EXPIRATION_TASK_PERIOD
public static int RQ_NRECENT
public static int RQ_FLUSH_PERIOD
public static int RQ_EXPIRATION_GRACE
public static int RQ_RETRANS_PERIOD
public static final String QUERY_INSERT_POINT_SPECIAL
SkipGraph.find(Endpoint, DdllKey, boolean)public static final ObjectId RQ_QUERY_AT_FIND
public static int FIND_INSERT_POINT_TIMEOUT
protected static final UniqId FIXPEERID
rqDisseminate(RQMessage, NavigableMap)public final Link FIXLEFT
public static final boolean NEWALGORITHM
protected final RQExecQueryCallback execQueryCallback
public RQManager(TransportId transId, ChannelTransport<E> trans, RQExecQueryCallback execQueryCallback) throws IdConflictException, IOException
protected boolean preferDelegateNodeLeftSide()
public RQVNode<E> getVNode(Comparable<?> rawkey)
RingManagergetVNode クラス内 RingManager<E extends Endpoint>rawkey - the raw key.protected void setRQAlgorithm(RQAlgorithm algo)
public RQIf<E> getStub(E addr, int rpcTimeout)
RPCInvokergetStub クラス内 RingManager<E extends Endpoint>addr - リモートピアを示すEndpointrpcTimeout - timeout値(msec)public RQIf<E> getStub(Endpoint dst)
RPCInvokergetStub クラス内 RingManager<E extends Endpoint>dst - リモートピアを示すEndpointpublic Node.InsertPoint findImmedNeighbors(E introducer, DdllKey key, Object query, TransOptions opts) throws UnavailableException, IOException
findImmedNeighbors インタフェース内 RQIf<E extends Endpoint>findImmedNeighbors クラス内 RingManager<E extends Endpoint>introducer - the node to communicate with.key - the query keyquery - the object for query.opts - the transport options.UnavailableException - 自ノードあるいはseedにkeyが登録されていないIOException - communication errorpublic RQResults scalableRangeQueryPro(Collection<? extends Range<?>> ranges, Object query, TransOptions opts)
protected RQReturn rqStartRawRange(Collection<? extends Range<?>> ranges, Object query, TransOptions opts, int retransPeriod, NavigableMap<DdllKey,Link> allLinks, RQAlgorithm rqAlgo)
ranges - ranges for the range queryquery - the query objectopts - transmission optionretransPeriod - slow retransmission period (in msec)allLinks - all links to split the ranges.rqAlgo - range query algorithmpublic static SubRange convertToSubRange(Range<? extends Comparable<?>> range)
public void rqDisseminate(RQMessage msg)
public void rqDisseminate(RQMessage msg, NavigableMap<DdllKey,Link> allLinks)
protected List<SubRange> rqSplit(Object query, SubRange range0, NavigableMap<DdllKey,Link> allLinks, Collection<Endpoint> failedLinks, List<DKRangeRValue<?>> rvals, RQAlgorithm rqAlgo)
query - the query object.range0 - the range to be splitallLinks - all links to split ranges.failedLinks - the failed links.rvals - return values for each range.rqAlgo - the algorithm for the range query.public List<RemoteValue<?>> forwardQuery(boolean isPlusDir, Range<?> range, int maxNum, Object query, TransOptions opts)
例えば、keyが10、NavigableCondがLOWER、numが5の場合、10を越えなくて、 10の近傍にある最大5個のキーが探索対象となる。 numに2以上をセットする用途としては、 DHTのように特定のkeyの近傍集合に アクセスするケースがある。 尚、探索対象となるキーは、指定されたkeyと同じ型を持つ必要が ある。
isPlusDir - +方向にrangeにサーチする場合はtruerange - 探索対象となるRangemaxNum - 条件を満たす最大個数query - the query passed to execQuery()opts - the transport options.public RingManager.ExecQueryReturn invokeExecQuery(Comparable<?> rawkey, Link curRight, QueryId qid, boolean doAction, Object query, TransOptions opts) throws NoSuchKeyException, RingManager.RightNodeMismatch
invokeExecQuery インタフェース内 RQIf<E extends Endpoint>NoSuchKeyException - rawkeyが存在しないRightNodeMismatch - curRightがマッチしないRingManager.RightNodeMismatchpublic RemoteValue<?> execQuery(Comparable<?> key, Object query)
key - the keyquery - the query objectCopyright © 2017. All rights reserved.