E - the type of Endpoint in the underlying network.public class ChordSharp<E extends Endpoint> extends RQManager<E> implements ChordSharpIf
RingManager.ExecQueryReturn, RingManager.LinkContainer, RingManager.RightNodeMismatchRPCInvoker.MethodCall| 修飾子とタイプ | フィールドと説明 |
|---|---|
static TransportId |
DEFAULT_TRANSPORT_ID |
static int |
FINGER_TABLE_UPDATE_CONCURRENCY |
execQueryCallback, FIND_INSERT_POINT_TIMEOUT, FIXLEFT, FIXPEERID, NEWALGORITHM, QID_EXPIRATION_TASK_PERIOD, QID_EXPIRE, QUERY_INSERT_POINT_SPECIAL, QUERY_KEY_SPECIAL, RQ_EXPIRATION_GRACE, RQ_FLUSH_PERIOD, RQ_NRECENT, RQ_QUERY_AT_FIND, RQ_RETRANS_PERIODDDLL_CHECK_PERIOD_L0, keyComp, keyHash, manager, msgframe, myLocator, peerId, rand, RPC_TIMEOUT, statman, transIdchannelPool, isActive, objId, POOL_CHANNEL, POOL_CHANNEL_SIZE, trans, USE_CHANNEL_FOR_ONEWAY| コンストラクタと説明 |
|---|
ChordSharp(TransportId transId,
ChannelTransport<E> trans,
RQExecQueryCallback execQueryCallback) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
aggregateDelegates(List<SubRange> dkrlist,
StrictMap<Id,List<SubRange>> map) |
List<ChordSharpVNode<E>> |
allValidVNodes()
get all inserted RingVNode instances
|
Collection<ChordSharpVNode<E>> |
allVNodes()
get all RingVNode instances
|
protected StrictMap<Id,List<SubRange>> |
assignDelegates(RQMessage msg,
List<SubRange[]> closeRanges)
各 range を subRange に分割し,それぞれ担当ノードを割り当てる.
|
protected List<Link> |
filterFailedNodes(FTEntry ftlist) |
void |
fin() |
NavigableMap<DdllKey,List<Link>> |
fragmentPoints(CircularRange<DdllKey> queryRange,
List<List<Link>> goodNodes,
List<SubRange[]> closeRanges,
Set<Endpoint> maybeFailed)
queryRangeを分割する.
|
protected Link |
getClosestPredecessor(DdllKey key,
List<List<Link>> goodNodes,
List<List<Link>> allNodes,
Set<Endpoint> maybeFailed)
ftlist (非故障ノードリスト) から,指定されたkeyのclosest predecessorを求める.
|
ChordSharpVNode.FTEntrySet |
getFingers(DdllKey key,
int x,
int y,
int k,
ChordSharpVNode.FTEntrySet given) |
FTEntry[][] |
getFingerTable(DdllKey key) |
int |
getHeight(Comparable<?> key) |
List<FTEntry> |
getValidFTEntries()
get valid finger table entries from all inserted ChordSharpVNode.
|
ChordSharpVNode<E> |
getVNode(Comparable<?> rawkey)
get RingVNode instance (for debugging only)
|
protected ChordSharpVNode<E> |
newVNode(Comparable<?> rawkey,
Object... params) |
void |
rqDisseminate(RQMessage msg,
NavigableMap<DdllKey,Link> unused) |
void |
scheduleFingerTableUpdate(int delay,
int interval) |
convertToSubRange, execQuery, findImmedNeighbors, forwardQuery, getStub, getStub, invokeExecQuery, preferDelegateNodeLeftSide, rqDisseminate, rqSplit, rqStartRawRange, scalableRangeQueryPro, setRQAlgorithmackReceived, addKey, addKey, addKey, checkLocked, find, findLeftLink, fixRoutingTables, getAvailableLinks, getClosestLinks, getLocalLinks, getPeerId, getRequestMessageById, isActive, newCondition, 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 TransportId DEFAULT_TRANSPORT_ID
public static final int FINGER_TABLE_UPDATE_CONCURRENCY
public ChordSharp(TransportId transId, ChannelTransport<E> trans, RQExecQueryCallback execQueryCallback) throws IdConflictException, IOException
protected ChordSharpVNode<E> newVNode(Comparable<?> rawkey, Object... params)
newVNode クラス内 RingManager<E extends Endpoint>rawkey - the rawkeyparams - parameters.public ChordSharpVNode.FTEntrySet getFingers(DdllKey key, int x, int y, int k, ChordSharpVNode.FTEntrySet given) throws NoSuchKeyException
getFingers インタフェース内 ChordSharpIfNoSuchKeyExceptionpublic FTEntry[][] getFingerTable(DdllKey key) throws NoSuchKeyException
getFingerTable インタフェース内 ChordSharpIfNoSuchKeyExceptionpublic int getHeight(Comparable<?> key)
public Collection<ChordSharpVNode<E>> allVNodes()
RingManagerallVNodes クラス内 RingManager<E extends Endpoint>public List<ChordSharpVNode<E>> allValidVNodes()
RingManagerallValidVNodes クラス内 RingManager<E extends Endpoint>public ChordSharpVNode<E> getVNode(Comparable<?> rawkey)
RingManagerpublic void fin()
fin クラス内 RingManager<E extends Endpoint>public List<FTEntry> getValidFTEntries()
public NavigableMap<DdllKey,List<Link>> fragmentPoints(CircularRange<DdllKey> queryRange, List<List<Link>> goodNodes, List<SubRange[]> closeRanges, Set<Endpoint> maybeFailed)
返り値は,(分割点, QRに含まれ,MFに含まれない,分割点と等しいか大きいノードの集合)のmap
[======QR=====]
ftlist: ABCD EFGH
上の図の場合,返り値は (C, {C, D}), (E, {E, F}) である.(MFが空のとき)
queryRange - query rangegoodNodes - list of list of peerscloseRanges - list of [my key, successor)maybeFailed - nodes not recommended for next hopprotected Link getClosestPredecessor(DdllKey key, List<List<Link>> goodNodes, List<List<Link>> allNodes, Set<Endpoint> maybeFailed)
key - the keygoodNodes - the good nodesallNodes - the all nodes.maybeFailed - the nodes that may be failed.public void rqDisseminate(RQMessage msg, NavigableMap<DdllKey,Link> unused)
rqDisseminate クラス内 RQManager<E extends Endpoint>protected StrictMap<Id,List<SubRange>> assignDelegates(RQMessage msg, List<SubRange[]> closeRanges)
msg - the message for range query.closeRanges - List of {[predecessor, n), [n, successor}},
where n is myself.public void aggregateDelegates(List<SubRange> dkrlist, StrictMap<Id,List<SubRange>> map)
public void scheduleFingerTableUpdate(int delay,
int interval)
Copyright © 2017. All rights reserved.