E - the type of Endpoint in the underlying network.public class RingVNode<E extends Endpoint> extends Object implements NodeObserver
| 修飾子とタイプ | クラスと説明 |
|---|---|
static class |
RingVNode.VNodeMode
mode of DdllRingVNode
|
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static boolean |
DDLL_OPT
true to turn on DDLL-OPT
|
static int |
DDLL_RETRY_INTERVAL |
protected Node |
ddllNode |
static int |
DEFAULT_DDLL_CHECK_PERIOD |
protected DdllKey |
key |
protected RingManager<E> |
manager |
protected RingVNode.VNodeMode |
mode |
static int |
NUMBER_OF_DDLL_RETRY |
| コンストラクタと説明 |
|---|
RingVNode(RingManager<E> rman,
Comparable<?> rawkey)
create a RingVNode instance.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected boolean |
addKey(E introducer)
insert a key into a ring.
|
void |
fixLeftLinks(Link link,
List<Link> failedLinks,
RQMessage msg,
List<CircularRange<DdllKey>> failedRanges) |
Link[] |
getAllLinks() |
protected static int |
getCheckPeriod() |
Node |
getDdllNode() |
DdllKey |
getKey()
get DdllKey
|
Link |
getLocalLink() |
RingManager<E> |
getManager() |
RingVNode.VNodeMode |
getMode() |
Link |
getPredecessor() |
Comparable<?> |
getRawKey()
get raw key
|
Link |
getSuccessor() |
boolean |
isInserted() |
boolean |
onNodeFailure(Collection<Link> failedLinks)
called when node failure is detected by DDLL's node monitor.
|
void |
onRightNodeChange(Link prevRight,
Link newRight,
Object payload)
called when the right link is changed by receiving a SetR message.
|
void |
payloadNotSent(Object payload)
called when the payload given via
Node.setR(Link, int, Link, Link, LinkNum, int, Object)
is not passed to the specified remote node. |
protected boolean |
removeKey() |
protected void |
rtLockR() |
protected void |
rtLockW() |
protected void |
rtUnlockR() |
protected void |
rtUnlockW() |
List<Link> |
suppplyLeftCandidatesForFix() |
String |
toString() |
String |
toStringRoutingTable() |
public static final int DEFAULT_DDLL_CHECK_PERIOD
public static final int NUMBER_OF_DDLL_RETRY
public static final int DDLL_RETRY_INTERVAL
public static final boolean DDLL_OPT
protected final RingManager<E extends Endpoint> manager
protected final DdllKey key
protected Node ddllNode
protected RingVNode.VNodeMode mode
public RingVNode(RingManager<E> rman, Comparable<?> rawkey)
rman - the p2p network instance that manages this noderawkey - the keyprotected static int getCheckPeriod()
public Node getDdllNode()
public RingVNode.VNodeMode getMode()
public Link getLocalLink()
public Link getSuccessor()
public Link getPredecessor()
public Link[] getAllLinks()
protected void rtLockR()
protected void rtUnlockR()
protected void rtLockW()
protected void rtUnlockW()
protected boolean addKey(E introducer) throws UnavailableException, IOException
introducer - 既に挿入済みのノードUnavailableException - introducerにkeyが存在しないIOException - introducerとの通信でエラー or insertion failureprotected boolean removeKey()
public String toStringRoutingTable()
public boolean isInserted()
public Comparable<?> getRawKey()
public DdllKey getKey()
public RingManager<E> getManager()
public void fixLeftLinks(Link link, List<Link> failedLinks, RQMessage msg, List<CircularRange<DdllKey>> failedRanges)
public void onRightNodeChange(Link prevRight, Link newRight, Object payload)
NodeObserveronRightNodeChange インタフェース内 NodeObserverprevRight - the previous right linknewRight - the new right linkpayload - an Object passed with SetR message.Node.setR(Link, int, Link, Link, LinkNum, int, Object)public void payloadNotSent(Object payload)
NodeObserverNode.setR(Link, int, Link, Link, LinkNum, int, Object)
is not passed to the specified remote node.
typically this happens when the SetR request fails.payloadNotSent インタフェース内 NodeObserverpayload - the payload not has been sentpublic boolean onNodeFailure(Collection<Link> failedLinks)
NodeObserveronNodeFailure インタフェース内 NodeObserverfailedLinks - the collection of failed links.public List<Link> suppplyLeftCandidatesForFix()
suppplyLeftCandidatesForFix インタフェース内 NodeObserverCopyright © 2017. All rights reserved.