クラス RQManager<E extends Endpoint>
java.lang.Object
org.piax.gtrans.RPCInvoker<RingIf,E>
org.piax.gtrans.ov.ring.RingManager<E>
org.piax.gtrans.ov.ring.rq.RQManager<E>
- 型パラメータ:
E- the type of Endpoint in the underlying network.
- 直系の既知のサブクラス:
ChordSharp
public class RQManager<E extends Endpoint> extends RingManager<E> implements RQIf<E>
this class adds range query functionality to the Ring network.
-
ネストされたクラスの概要
クラスから継承されたネストされたクラス/インタフェース org.piax.gtrans.ov.ring.RingManager
RingManager.ExecQueryReturn, RingManager.LinkContainer, RingManager.RightNodeMismatch -
フィールドの概要
フィールド 修飾子とタイプ フィールド 説明 protected RQExecQueryCallbackexecQueryCallbackstatic intFIND_INSERT_POINT_TIMEOUTLinkFIXLEFTpseudo Link instance that represents the link should be fixedprotected static PeerIdFIXPEERIDpseudo PeerID used byrqDisseminate(RQMessage, NavigableMap)static booleanNEWALGORITHMstatic intQID_EXPIRATION_TASK_PERIODperiod for executing a task for purging stale QueryIDsstatic intQID_EXPIREexpiration time for purging stale QueryIDsstatic StringQUERY_INSERT_POINT_SPECIALused as the query string for finding insert points.static StringQUERY_KEY_SPECIALstatic intRQ_EXPIRATION_GRACEadditional grace time before removing RQReturn in intermediate nodesstatic intRQ_FLUSH_PERIODthe period for flushing partial results in intermediate nodesstatic intRQ_NRECENTRange Queryでトラバース中に通信エラーが起きた場合に戻れるノード数static ObjectIdRQ_QUERY_AT_FINDstatic intRQ_RETRANS_PERIODrange query retransmission periodクラスから継承されたフィールド org.piax.gtrans.ov.ring.RingManager
DDLL_CHECK_PERIOD_L0, DEFAULT_TRANSPORT_ID, keyComp, keyHash, manager, msgframe, myLocator, peerId, rand, RPC_TIMEOUT, statman, transIdクラスから継承されたフィールド org.piax.gtrans.RPCInvoker
channelPool, isActive, objId, POOL_CHANNEL, POOL_CHANNEL_SIZE, trans, USE_CHANNEL_FOR_ONEWAY -
コンストラクタの概要
コンストラクタ コンストラクタ 説明 RQManager(TransportId transId, ChannelTransport<E> trans, RQExecQueryCallback execQueryCallback) -
メソッドの概要
修飾子とタイプ メソッド 説明 static SubRangeconvertToSubRange(Range<? extends Comparable<?>> range)RemoteValue<?>execQuery(Comparable<?> key, Object query)Range Query実行時に呼び出されるメソッド.Node.InsertPointfindImmedNeighbors(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.ExecQueryReturninvokeExecQuery(Comparable<?> rawkey, Link curRight, QueryId qid, boolean doAction, Object query, TransOptions opts)Range Query実行時にRPCで呼び出されるメソッド.protected booleanpreferDelegateNodeLeftSide()voidrqDisseminate(RQMessage msg)voidrqDisseminate(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 RQReturnrqStartRawRange(Collection<? extends Range<?>> ranges, Object query, TransOptions opts, int retransPeriod, NavigableMap<DdllKey,Link> allLinks, RQAlgorithm rqAlgo)perform a range query (internal).RQResultsscalableRangeQueryPro(Collection<? extends Range<?>> ranges, Object query, TransOptions opts)protected voidsetRQAlgorithm(RQAlgorithm algo)クラスから継承されたメソッド org.piax.gtrans.ov.ring.RingManager
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, toStringShortクラスから継承されたメソッド org.piax.gtrans.RPCInvoker
changeRPCTimeout, changeTransport, checkActive, createObjId, 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, unregisterRPCObjectクラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitインタフェースから継承されたメソッド org.piax.gtrans.ov.ring.RingIf
ackReceived, getClosestLinks, getLocalLinks, replyMsgReceived, requestMsgReceived
-
フィールド詳細
-
QID_EXPIRE
public static int QID_EXPIREexpiration time for purging stale QueryIDs -
QID_EXPIRATION_TASK_PERIOD
public static int QID_EXPIRATION_TASK_PERIODperiod for executing a task for purging stale QueryIDs -
RQ_NRECENT
public static int RQ_NRECENTRange Queryでトラバース中に通信エラーが起きた場合に戻れるノード数 -
RQ_FLUSH_PERIOD
public static int RQ_FLUSH_PERIODthe period for flushing partial results in intermediate nodes -
RQ_EXPIRATION_GRACE
public static int RQ_EXPIRATION_GRACEadditional grace time before removing RQReturn in intermediate nodes -
RQ_RETRANS_PERIOD
public static int RQ_RETRANS_PERIODrange query retransmission period -
QUERY_INSERT_POINT_SPECIAL
used as the query string for finding insert points. seeSkipGraph.find(Endpoint, DdllKey, boolean)- 関連項目:
- 定数フィールド値
-
QUERY_KEY_SPECIAL
- 関連項目:
- 定数フィールド値
-
RQ_QUERY_AT_FIND
-
FIND_INSERT_POINT_TIMEOUT
public static int FIND_INSERT_POINT_TIMEOUT -
FIXPEERID
pseudo PeerID used byrqDisseminate(RQMessage, NavigableMap) -
FIXLEFT
pseudo Link instance that represents the link should be fixed -
NEWALGORITHM
public static final boolean NEWALGORITHM- 関連項目:
- 定数フィールド値
-
execQueryCallback
-
-
コンストラクタの詳細
-
RQManager
public RQManager(TransportId transId, ChannelTransport<E> trans, RQExecQueryCallback execQueryCallback) throws IdConflictException, IOException
-
-
メソッドの詳細
-
preferDelegateNodeLeftSide
protected boolean preferDelegateNodeLeftSide() -
getVNode
クラスからコピーされた説明:RingManagerget RingVNode instance (for debugging only)- オーバーライド:
getVNodeクラス内RingManager<E extends Endpoint>- パラメータ:
rawkey- the raw key.- 戻り値:
- RingVNode the ring node.
-
setRQAlgorithm
-
getStub
クラスからコピーされた説明:RPCInvokerリモートピア上のこのオブジェクトに対応するRPCInvokerオブジェクトのメソッドを呼び出すためのstubを返す。- オーバーライド:
getStubクラス内RingManager<E extends Endpoint>- パラメータ:
addr- リモートピアを示すEndpointrpcTimeout- timeout値(msec)- 戻り値:
- RPCのためのstub
-
getStub
クラスからコピーされた説明:RPCInvokerリモートピア上のこのオブジェクトに対応するRPCInvokerオブジェクトのメソッドを 呼び出すためのstubを返す。- オーバーライド:
getStubクラス内RingManager<E extends Endpoint>- パラメータ:
dst- リモートピアを示すEndpoint- 戻り値:
- RPCのためのstub
-
findImmedNeighbors
public Node.InsertPoint findImmedNeighbors(E introducer, DdllKey key, Object query, TransOptions opts) throws UnavailableException, IOExceptionfind a location to insert `key'.- 定義:
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.- 戻り値:
- the insertion point for `key'
- 例外:
UnavailableException- 自ノードあるいはseedにkeyが登録されていないIOException- communication error
-
scalableRangeQueryPro
public RQResults scalableRangeQueryPro(Collection<? extends Range<?>> ranges, Object query, TransOptions opts) -
rqStartRawRange
protected RQReturn rqStartRawRange(Collection<? extends Range<?>> ranges, Object query, TransOptions opts, int retransPeriod, NavigableMap<DdllKey,Link> allLinks, RQAlgorithm rqAlgo)perform a range query (internal).- パラメータ:
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 algorithm- 戻り値:
- RQReturn
-
convertToSubRange
-
rqDisseminate
-
rqDisseminate
-
rqSplit
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. Also assign an appropriate remote delegate node for each subrange.- パラメータ:
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.- 戻り値:
- the list of subranges.
-
forwardQuery
public List<RemoteValue<?>> forwardQuery(boolean isPlusDir, Range<?> range, int maxNum, Object query, TransOptions opts)指定されたkeyとNavigableCondの条件を満たすキーを持つピア(最大num個)にクエリを転送し、 得られた結果(リスト)を返す。例えば、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.- 戻り値:
- クエリ結果のリスト
-
invokeExecQuery
public RingManager.ExecQueryReturn invokeExecQuery(Comparable<?> rawkey, Link curRight, QueryId qid, boolean doAction, Object query, TransOptions opts) throws NoSuchKeyException, RingManager.RightNodeMismatchRange Query実行時にRPCで呼び出されるメソッド. 指定されたパラメータで execQuery を実行する. curRight != null の場合,レベル0の右リンクがcurRightと等しい場合にのみ実行. execQueryの結果(RemoteValue)と,レベル0での左右のリンクを ExecQueryReturn に詰めて返す.- 定義:
invokeExecQueryインタフェース内RQIf<E extends Endpoint>- 例外:
NoSuchKeyException- rawkeyが存在しないRingManager.RightNodeMismatch- curRightがマッチしない
-
execQuery
Range Query実行時に呼び出されるメソッド.- パラメータ:
key- the keyquery- the query object- 戻り値:
- the result of the query (remote values).
-