public class CombinedOverlay extends OverlayImpl<Destination,Key> implements OverlayListener<Destination,Key>
| 修飾子とタイプ | フィールドと説明 |
|---|---|
AttributeTable |
table |
isJoined, keyRegisterNONdefaultAppId, isActive, isBaseTransport, listenersByUpper, lowerTrans, peer, peerId, transId, transIdPath, uppersDEFAULT_APP_ID| コンストラクタと説明 |
|---|
CombinedOverlay(Peer peer,
TransportId transId) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
boolean |
addKey(ObjectId upper,
Key key)
指定されたkeyをオーバレイに登録する。
|
void |
bindOverlay(String attribName,
TransportIdPath suffix)
指定されたattribNameを持つAttributeに、
指定されたTransportIdPathをsuffixとして持ち、型の互換性のあるOverlayをbindさせる。
|
void |
declareAttrib(String attribName) |
void |
declareAttrib(String attribName,
Class<?> type) |
void |
fin()
Finalize the Transport object.
|
Overlay<?,?> |
getBindOverlay(String attribName) |
List<String> |
getDeclaredAttribNames() |
Endpoint |
getEndpoint()
Returns the local endpoint of the Transport.
|
Set<Key> |
getKeys() |
RowData |
getRow(Id rowId)
指定されたrowIdを持つRowDataを取得する。
|
List<RowData> |
getRows() |
void |
insertRow(RowData row)
RowDataを挿入する。
|
boolean |
isJoined()
overlayの状態(join/leave)を返す。
|
boolean |
join(Collection<? extends Endpoint> seeds)
引数で指定されたseedのリストをseedピアとして、Overlayをjoinする。
|
boolean |
leave()
Overlayを不活性化(leave)する。
|
RowData |
newRow(Id rowId)
指定されたrowIdを持つRowDataを新たに生成する。
|
void |
onReceive(Overlay<Destination,Key> trans,
OverlayReceivedMessage<Key> rmsg) |
void |
onReceive(RequestTransport<Destination> trans,
ReceivedMessage rmsg) |
void |
onReceive(Transport<Destination> trans,
ReceivedMessage rmsg)
Transportオブジェクトがメッセージを受信した際に呼び出されるメソッド。
|
FutureQueue<?> |
onReceiveRequest(Overlay<Destination,Key> trans,
OverlayReceivedMessage<Key> rmsg) |
FutureQueue<?> |
onReceiveRequest(RequestTransport<Destination> trans,
ReceivedMessage rmsg) |
boolean |
removeKey(ObjectId upper,
Key key)
指定されたkeyをオーバレイから登録削除する。
|
RowData |
removeRow(Id rowId) |
FutureQueue<?> |
request(ObjectId sender,
ObjectId receiver,
Destination dst,
Object msg,
TransOptions opts)
Send a request message.
|
FutureQueue<?> |
request(ObjectId sender,
ObjectId receiver,
String dstExp,
Object msg,
int timeout) |
FutureQueue<?> |
request(ObjectId sender,
ObjectId receiver,
String dstExp,
Object msg,
TransOptions opts) |
void |
send(ObjectId sender,
ObjectId receiver,
String dstExp,
Object msg) |
RowData |
setSuperRow(Id rowId)
指定されたrowIdを持つRowDataをsuperRowとしてセットする。
|
void |
unbindOverlay(String attribName) |
addKey, getAvailableKeyType, getKeys, getListener, join, lowerAddKey, lowerRemoveKey, registerKey, removeKey, request, request, request, request, request, request, request, request, selectOnReceive, send, send, send, setListener, singletonFutureQueue, singletonFutureQueue, toString0, unregisterKeycheckAndClearIsEasySend, getListener0, request, 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, waitrequest, request, 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 final AttributeTable table
public CombinedOverlay(Peer peer, TransportId transId) throws IdConflictException
public void fin()
Transportfin インタフェース内 Transport<Destination>fin クラス内 TransportImpl<Destination>public void send(ObjectId sender, ObjectId receiver, String dstExp, Object msg) throws org.piax.common.dcl.parser.ParseException, ProtocolUnsupportedException, IOException
send インタフェース内 Overlay<Destination,Key>send クラス内 OverlayImpl<Destination,Key>org.piax.common.dcl.parser.ParseExceptionProtocolUnsupportedExceptionIOExceptionpublic FutureQueue<?> request(ObjectId sender, ObjectId receiver, String dstExp, Object msg, TransOptions opts) throws org.piax.common.dcl.parser.ParseException, ProtocolUnsupportedException, IOException
request インタフェース内 Overlay<Destination,Key>request クラス内 OverlayImpl<Destination,Key>org.piax.common.dcl.parser.ParseExceptionProtocolUnsupportedExceptionIOExceptionpublic FutureQueue<?> request(ObjectId sender, ObjectId receiver, String dstExp, Object msg, int timeout) throws org.piax.common.dcl.parser.ParseException, ProtocolUnsupportedException, IOException
request インタフェース内 Overlay<Destination,Key>request クラス内 OverlayImpl<Destination,Key>org.piax.common.dcl.parser.ParseExceptionProtocolUnsupportedExceptionIOExceptionpublic FutureQueue<?> request(ObjectId sender, ObjectId receiver, Destination dst, Object msg, TransOptions opts) throws ProtocolUnsupportedException, IOException
RequestTransportrequest インタフェース内 RequestTransport<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 void onReceive(Overlay<Destination,Key> trans, OverlayReceivedMessage<Key> rmsg)
onReceive インタフェース内 OverlayListener<Destination,Key>public FutureQueue<?> onReceiveRequest(Overlay<Destination,Key> trans, OverlayReceivedMessage<Key> rmsg)
onReceiveRequest インタフェース内 OverlayListener<Destination,Key>public void declareAttrib(String attribName) throws IllegalStateException
public void declareAttrib(String attribName, Class<?> type) throws IllegalStateException
public void bindOverlay(String attribName, TransportIdPath suffix) throws IllegalArgumentException, NoSuchOverlayException, IncompatibleTypeException
attribName - attribNamesuffix - suffixとして指定されたTransportIdPathIllegalArgumentException - 該当するAttributeが存在しない場合NoSuchOverlayException - 該当するOverlayが存在しない場合IncompatibleTypeException - 型の互換性が原因で候補が得られない場合public void unbindOverlay(String attribName) throws IllegalArgumentException, IllegalStateException
public Overlay<?,?> getBindOverlay(String attribName) throws IllegalArgumentException
public RowData setSuperRow(Id rowId) throws IdConflictException
rowId - rowIdIdConflictException - すでにsuperRowが存在する場合public RowData newRow(Id rowId) throws IdConflictException
rowId - rowIdIdConflictException - すでにRowDataが存在する場合public void insertRow(RowData row) throws IllegalStateException, IdConflictException
この挿入によって起こりうる不整合に注意する必要がある。 属性値を別に持つRowDataを新たにtableに挿入することで、属性名との不整合が起こりうる。 このため、Attributeに対してunboundなRowDataでないと挿入は許されない。
row - RowDataIllegalStateException - RowDataがAttributeに対してunboundでない場合IdConflictException - すでに同じrowIdを持つRowDataが存在する場合public RowData getRow(Id rowId)
rowId - rowIdpublic Endpoint getEndpoint()
TransportgetEndpoint インタフェース内 Transport<Destination>public boolean join(Collection<? extends Endpoint> seeds) throws IOException
OverlayOverlayがすでにjoinな状態の場合は、joinは実行されずに、falseが返る。
join インタフェース内 Overlay<Destination,Key>join クラス内 OverlayImpl<Destination,Key>seeds - seedピアのリストIOException - join時に例外が発生した時public boolean leave()
throws IOException
Overlayleave インタフェース内 Overlay<Destination,Key>leave クラス内 OverlayImpl<Destination,Key>IOException - I/Oエラーが発生した場合public boolean isJoined()
OverlayisJoined インタフェース内 Overlay<Destination,Key>isJoined クラス内 OverlayImpl<Destination,Key>public boolean addKey(ObjectId upper, Key key) throws IOException
Overlay同一key が複数回登録される場合は、 key がすでにオーバレイに登録されていても、false は返らない。
null を key として登録することはできない。 引数に nullを指定した場合は、IllegalArgumentException が発生する。 引数が、実装クラスにとって適切な型でない場合は、 ClassCastException が発生する。 また、実装クラスがこのメソッドをサポートしない場合は、 UnsupportedOperationException が発生する。 実装クラス特有の例外が発生した場合は、IOExceptionのサブクラスとなる例外が発生する。
addKey インタフェース内 Overlay<Destination,Key>addKey クラス内 OverlayImpl<Destination,Key>upper - このオーバーレイを利用するエンティティのObjectIdkey - オーバレイに登録するkeyIOException - 実装クラス特有の例外が発生した場合public boolean removeKey(ObjectId upper, Key key) throws IOException
Overlaykey がオーバレイに登録されていない場合は、falseが返る。 同一key が複数回登録される場合は、 addKey された回数と同じ回数だけremoveKeyが呼ばれないとkeyは削除されない。
null を key として指定することはできない。 引数に nullを指定した場合は、IllegalArgumentException が発生する。 引数が、実装クラスにとって適切な型でない場合は、 ClassCastException が発生する。 また、実装クラスがこのメソッドをサポートしない場合は、 UnsupportedOperationException が発生する。 実装クラス特有の例外が発生した場合は、IOExceptionのサブクラスとなる例外が発生する。
removeKey インタフェース内 Overlay<Destination,Key>removeKey クラス内 OverlayImpl<Destination,Key>upper - このオーバーレイを利用するエンティティのObjectIdkey - オーバレイから登録削除するkeyIOException - 実装クラス特有の例外が発生した場合public Set<Key> getKeys()
getKeys インタフェース内 Overlay<Destination,Key>getKeys クラス内 OverlayImpl<Destination,Key>public void onReceive(Transport<Destination> trans, ReceivedMessage rmsg)
TransportListeneronReceive インタフェース内 OverlayListener<Destination,Key>onReceive インタフェース内 TransportListener<Destination>trans - Transportオブジェクトrmsg - ReceivedMessageオブジェクトpublic void onReceive(RequestTransport<Destination> trans, ReceivedMessage rmsg)
public FutureQueue<?> onReceiveRequest(RequestTransport<Destination> trans, ReceivedMessage rmsg)
Copyright © 2017. All rights reserved.