public class MSkipGraph<D extends Destination,K extends ComparableKey<?>> extends OverlayImpl<D,K> implements RoutingTableAccessor, SGExecQueryCallback
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static TransportId |
DEFAULT_TRANSPORT_ID |
isJoined, keyRegisterNONdefaultAppId, isActive, isBaseTransport, listenersByUpper, lowerTrans, peer, peerId, transId, transIdPath, uppersDEFAULT_APP_ID| コンストラクタと説明 |
|---|
MSkipGraph(ChannelTransport<?> lowerTrans) |
MSkipGraph(TransportId transId,
ChannelTransport<?> lowerTrans) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
boolean |
addKey(ObjectId upper,
K key)
指定されたkeyをオーバレイに登録する。
|
void |
fin()
Finalize the Transport object.
|
FutureQueue<?> |
forwardQueryToMaxLessThan(ObjectId sender,
ObjectId receiver,
LowerUpper lu,
Object msg) |
Link[] |
getAll() |
Class<?> |
getAvailableKeyType() |
Endpoint |
getEndpoint()
Returns the local endpoint of the Transport.
|
int |
getHeight(Comparable<?> key) |
Set<K> |
getKeys(ObjectId upper) |
Link |
getLeft(Comparable<?> key) |
Link |
getLeft(Comparable<?> key,
int level) |
Link[] |
getLefts(Comparable<?> key) |
Link[] |
getLefts(Comparable<?> key,
int level) |
Link |
getLocal(Comparable<?> key) |
Link |
getRight(Comparable<?> key) |
Link |
getRight(Comparable<?> key,
int level) |
Link[] |
getRights(Comparable<?> key) |
Link[] |
getRights(Comparable<?> key,
int level) |
boolean |
join(Collection<? extends Endpoint> seeds)
引数で指定されたseedのリストをseedピアとして、Overlayをjoinする。
|
boolean |
leave()
Overlayを不活性化(leave)する。
|
protected void |
lowerAddKey(K key) |
protected void |
lowerRemoveKey(K key) |
FutureQueue<?> |
onReceiveRequest(Collection<K> matchedKeys,
NestedMessage nmsg) |
boolean |
removeKey(ObjectId upper,
K key)
指定されたkeyをオーバレイから登録削除する。
|
FutureQueue<?> |
request(ObjectId sender,
ObjectId receiver,
Destination dst,
Object msg,
TransOptions opts)
Send a request message.
|
FutureQueue<?> |
request(ObjectId sender,
ObjectId receiver,
D dst,
Object msg,
int timeout)
Send a request message.
|
FutureQueue<?> |
request1(ObjectId sender,
ObjectId receiver,
K dst,
Object msg,
TransOptions opts) |
FutureQueue<?> |
request2(ObjectId sender,
ObjectId receiver,
KeyRange<K> dst,
Object msg,
TransOptions opts) |
FutureQueue<?> |
request3(ObjectId sender,
ObjectId receiver,
KeyRanges<K> dst,
Object msg,
TransOptions opts) |
RemoteValue<?> |
sgExecQuery(Comparable<?> key,
Object msg) |
addKey, getKeys, getListener, isJoined, join, registerKey, removeKey, request, request, request, request, request, request, request, request, request, request, selectOnReceive, send, send, send, send, setListener, singletonFutureQueue, singletonFutureQueue, toString0, unregisterKeycheckAndClearIsEasySend, getListener0, request, request, request, request, request, request, request, request, request, selectOnReceive, send, sendcheckActive, getBaseTransport, getDefaultAppId, getListener, getLowerTransport, getLowerTransports, getMTU, getPeer, getPeerId, getTransportId, getTransportIdPath, getUppers, hasStableLocator, isUp, send, send, send, send, send, send, setBaseTransport, setDefaultAppId, setListener, setListener, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitkeySetrequest, request, request, request, request, request, request, request, requestgetBaseTransport, getListener, getLowerTransport, getLowerTransports, getMTU, getPeer, getPeerId, getTransportId, getTransportIdPath, hasStableLocator, isUp, send, send, send, send, send, send, send, send, setListener, setListenerpublic static TransportId DEFAULT_TRANSPORT_ID
public MSkipGraph(ChannelTransport<?> lowerTrans) throws IdConflictException, IOException
public MSkipGraph(TransportId transId, ChannelTransport<?> lowerTrans) throws IdConflictException, IOException
public void fin()
Transportfin インタフェース内 Transport<D extends Destination>fin クラス内 TransportImpl<D extends Destination>public Endpoint getEndpoint()
TransportgetEndpoint インタフェース内 Transport<D extends Destination>public FutureQueue<?> request1(ObjectId sender, ObjectId receiver, K dst, Object msg, TransOptions opts) throws ProtocolUnsupportedException, IOException
public FutureQueue<?> request2(ObjectId sender, ObjectId receiver, KeyRange<K> dst, Object msg, TransOptions opts) throws ProtocolUnsupportedException, IOException
public FutureQueue<?> request3(ObjectId sender, ObjectId receiver, KeyRanges<K> dst, Object msg, TransOptions opts) throws ProtocolUnsupportedException, IOException
public FutureQueue<?> request(ObjectId sender, ObjectId receiver, Destination dst, Object msg, TransOptions opts) throws ProtocolUnsupportedException, IOException
RequestTransportrequest インタフェース内 RequestTransport<D extends Destination>sender - the object ID of the sender.receiver - the object ID of the receiver.dst - the destination.msg - the request message.opts - the options.ProtocolUnsupportedException - thrown when the protocol is not supported.IOException - thrown when an I/O error occurs.public FutureQueue<?> forwardQueryToMaxLessThan(ObjectId sender, ObjectId receiver, LowerUpper lu, Object msg) throws IllegalStateException
public RemoteValue<?> sgExecQuery(Comparable<?> key, Object msg)
sgExecQuery インタフェース内 SGExecQueryCallbackpublic FutureQueue<?> onReceiveRequest(Collection<K> matchedKeys, NestedMessage nmsg)
public boolean join(Collection<? extends Endpoint> seeds) throws IOException
OverlayOverlayがすでにjoinな状態の場合は、joinは実行されずに、falseが返る。
join インタフェース内 Overlay<D extends Destination,K extends ComparableKey<?>>join クラス内 OverlayImpl<D extends Destination,K extends ComparableKey<?>>seeds - seedピアのリストIOException - join時に例外が発生した時public boolean leave()
throws IOException
Overlayleave インタフェース内 Overlay<D extends Destination,K extends ComparableKey<?>>leave クラス内 OverlayImpl<D extends Destination,K extends ComparableKey<?>>IOException - I/Oエラーが発生した場合public Class<?> getAvailableKeyType()
getAvailableKeyType インタフェース内 Overlay<D extends Destination,K extends ComparableKey<?>>getAvailableKeyType クラス内 OverlayImpl<D extends Destination,K extends ComparableKey<?>>protected void lowerAddKey(K key) throws IOException
lowerAddKey クラス内 OverlayImpl<D extends Destination,K extends ComparableKey<?>>IOExceptionpublic boolean addKey(ObjectId upper, K key) throws IOException
Overlay同一key が複数回登録される場合は、 key がすでにオーバレイに登録されていても、false は返らない。
null を key として登録することはできない。 引数に nullを指定した場合は、IllegalArgumentException が発生する。 引数が、実装クラスにとって適切な型でない場合は、 ClassCastException が発生する。 また、実装クラスがこのメソッドをサポートしない場合は、 UnsupportedOperationException が発生する。 実装クラス特有の例外が発生した場合は、IOExceptionのサブクラスとなる例外が発生する。
addKey インタフェース内 Overlay<D extends Destination,K extends ComparableKey<?>>addKey クラス内 OverlayImpl<D extends Destination,K extends ComparableKey<?>>upper - このオーバーレイを利用するエンティティのObjectIdkey - オーバレイに登録するkeyIOException - 実装クラス特有の例外が発生した場合protected void lowerRemoveKey(K key) throws IOException
lowerRemoveKey クラス内 OverlayImpl<D extends Destination,K extends ComparableKey<?>>IOExceptionpublic boolean removeKey(ObjectId upper, K key) throws IOException
Overlaykey がオーバレイに登録されていない場合は、falseが返る。 同一key が複数回登録される場合は、 addKey された回数と同じ回数だけremoveKeyが呼ばれないとkeyは削除されない。
null を key として指定することはできない。 引数に nullを指定した場合は、IllegalArgumentException が発生する。 引数が、実装クラスにとって適切な型でない場合は、 ClassCastException が発生する。 また、実装クラスがこのメソッドをサポートしない場合は、 UnsupportedOperationException が発生する。 実装クラス特有の例外が発生した場合は、IOExceptionのサブクラスとなる例外が発生する。
removeKey インタフェース内 Overlay<D extends Destination,K extends ComparableKey<?>>removeKey クラス内 OverlayImpl<D extends Destination,K extends ComparableKey<?>>upper - このオーバーレイを利用するエンティティのObjectIdkey - オーバレイから登録削除するkeyIOException - 実装クラス特有の例外が発生した場合public Set<K> getKeys(ObjectId upper)
getKeys インタフェース内 Overlay<D extends Destination,K extends ComparableKey<?>>getKeys クラス内 OverlayImpl<D extends Destination,K extends ComparableKey<?>>public FutureQueue<?> request(ObjectId sender, ObjectId receiver, D dst, Object msg, int timeout) throws ProtocolUnsupportedException, IOException
RequestTransportrequest インタフェース内 RequestTransport<D extends Destination>request クラス内 RequestTransportImpl<D extends Destination>sender - the object ID of the sender.receiver - the object ID of the receiver.dst - the destination.msg - the request message.timeout - the timeout.ProtocolUnsupportedException - thrown when the protocol is not supported.IOException - thrown when an I/O error occurs.public Link[] getAll()
getAll インタフェース内 RoutingTableAccessorpublic Link getLocal(Comparable<?> key)
getLocal インタフェース内 RoutingTableAccessorpublic Link getRight(Comparable<?> key)
getRight インタフェース内 RoutingTableAccessorpublic Link getLeft(Comparable<?> key)
getLeft インタフェース内 RoutingTableAccessorpublic Link getRight(Comparable<?> key, int level)
getRight インタフェース内 RoutingTableAccessorpublic Link getLeft(Comparable<?> key, int level)
getLeft インタフェース内 RoutingTableAccessorpublic Link[] getRights(Comparable<?> key)
getRights インタフェース内 RoutingTableAccessorpublic Link[] getLefts(Comparable<?> key)
getLefts インタフェース内 RoutingTableAccessorpublic Link[] getRights(Comparable<?> key, int level)
getRights インタフェース内 RoutingTableAccessorpublic Link[] getLefts(Comparable<?> key, int level)
getLefts インタフェース内 RoutingTableAccessorpublic int getHeight(Comparable<?> key)
getHeight インタフェース内 RoutingTableAccessorCopyright © 2017. All rights reserved.