public class FixedNodeConnectionPolicy extends ConnectionPolicy
ConnectionPolicy which only supports a single node
and does not issue automatic re-tries.DefaultConnectionPolicy| Constructor | Description |
|---|---|
FixedNodeConnectionPolicy(PeerNode remoteNode) |
Creates a new connection policy working with the given remote node.
|
FixedNodeConnectionPolicy(java.lang.String remoteNode) |
Creates a new connection policy working with the given remote node.
|
| Modifier and Type | Method | Description |
|---|---|---|
<E extends java.lang.Exception> |
selectNode(int retry,
PeerNode failedNode,
E e) |
Selects the node to (re-)connect with.
|
availableNodeAdded, availableNodeRemoved, availableNodesReset, nodeConnectSuccess, nodeFailed, nodeFailReset, selectNodepublic FixedNodeConnectionPolicy(PeerNode remoteNode)
remoteNode - the (only) available remote nodepublic FixedNodeConnectionPolicy(java.lang.String remoteNode)
remoteNode - the (only) available remote nodepublic <E extends java.lang.Exception> PeerNode selectNode(int retry, PeerNode failedNode, E e) throws E extends java.lang.Exception, java.lang.UnsupportedOperationException
ConnectionPolicyselectNode in class ConnectionPolicyE - the type of the exception that came from the failed connection
and may be re-thrownretry - the n'th retry (initial connect = 0, 1st reconnect = 1,...)failedNode - the node from the previous connection attempt or nulle - the exception that came back from the previous connection
attempt or nullE - if thrown, automatic re-connection attempts will stopjava.lang.UnsupportedOperationException - is thrown if the operation can not be performed, e.g. the
list is emptyE extends java.lang.ExceptionConnection.connect(),
Connection.doRPC(String, String,
com.ericsson.otp.erlang.OtpErlangList),
Connection.doRPC(String, String,
com.ericsson.otp.erlang.OtpErlangObject[])