|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClusterProtocol
Interface representing a client protocol connection on top of encapsulated multiple protocol connections to a cluster of similarly configured servers.
Field Summary |
---|
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver |
---|
DEF_INPUT_SIZE |
Fields inherited from interface com.genesyslab.platform.commons.protocol.Channel |
---|
DEFAULT_TIMEOUT, INFINITE_TIMEOUT |
Method Summary | ||
---|---|---|
void |
addNodes(java.lang.Iterable<WSConfig> nodes)
Adds collection of WarmStandby configurations as additional cluster protocol nodes. |
|
void |
addNodes(WSConfig... nodes)
Adds list of WarmStandby configurations as additional cluster protocol nodes. |
|
void |
addNodesEndpoints(Endpoint... endpoints)
Adds Endpoint's list as additional cluster protocol nodes. |
|
void |
addNodesEndpoints(java.lang.Iterable<Endpoint> endpoints)
Adds Endpoint's collection as additional cluster protocol nodes. |
|
|
closeAsync(CompletionHandler<ChannelClosedEvent,? super A> handler,
A attachment)
Initiates connections close to all of the cluster nodes. Provided Completion Handler will be notified when all cluster nodes connections got closed. |
|
java.util.List<Protocol> |
getAllNodesProtocols()
Returns snapshot list of all cluster protocol nodes. |
|
Protocol |
getNextAvailableProtocol()
Returns reference to some opened instance of protocol in the cluster nodes pool in accordance to the LB strategy. |
|
Protocol |
getNextAvailableProtocol(Message message)
Returns reference to some opened instance of protocol in the cluster nodes pool in accordance to the LB strategy for handling of the given request message. |
|
Protocol |
getNodeProtocol(int protocolId)
Returns cluster protocol node instance by PSDK Protocol Id. It may be useful in cases, when it is required to get particular server connection by ProtocolId of specific response, or unsolicited event message. |
|
Protocol |
getNodeProtocol(java.lang.String nodeName)
Returns cluster protocol node instance by name of configured Endpoint or WSConfig . |
|
java.util.List<WSConfig> |
getNodesConfig()
Returns list of cluster nodes connections configurations. |
|
java.util.List<Protocol> |
getOpenedNodesProtocols()
Returns snapshot list of cluster protocol nodes, which are tracked as Opened at the moment. |
|
|
openAsync(CompletionHandler<ChannelOpenedEvent,? super A> handler,
A attachment)
Initiates connections to the initialized set of cluster nodes. The completion handler will be notified by the first connection open event. |
|
ClusterProtocolPolicy |
policy()
Returns reference to the actual cluster protocol policy. |
|
void |
removeNodes(java.lang.Iterable<java.lang.String> names)
Removes cluster protocol node(s) by given nodes names. |
|
void |
removeNodes(java.lang.String... names)
Removes cluster protocol node(s) by given nodes names. |
|
void |
setNodes(java.lang.Iterable<WSConfig> nodes)
Sets or resets actual cluster nodes WarmStandby connections configurations. |
|
void |
setNodes(WSConfig... nodes)
Sets or resets actual cluster nodes WarmStandby connections configurations. |
|
void |
setNodesEndpoints(Endpoint... endpoints)
Sets or resets actual cluster nodes Endpoint's list. |
|
void |
setNodesEndpoints(java.lang.Iterable<Endpoint> endpoints)
Sets or resets actual cluster nodes Endpoint's list. |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Protocol |
---|
getProtocolId, getReferenceBuilder |
Methods inherited from interface com.genesyslab.platform.commons.protocol.InputChannel |
---|
setMessageHandler |
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiver |
---|
receive, receive |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Receiver |
---|
clearInput, getInputSize, releaseReceivers, setInputSize |
Methods inherited from interface com.genesyslab.platform.commons.protocol.OutputChannel |
---|
addListener, removeListener, send |
Methods inherited from interface com.genesyslab.platform.commons.protocol.RequestChannel |
---|
beginRequest, endRequest, endRequest, getCopyResponse, request, request, requestAsync, requestAsync, setCopyResponse |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Channel |
---|
close, close, getTimeout, open, open, setTimeout |
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncChannel |
---|
beginClose, beginOpen, getState |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ChannelListenerSupport |
---|
addChannelListener, removeChannelListener |
Methods inherited from interface com.genesyslab.platform.commons.protocol.InterceptorSupport |
---|
getInterceptor |
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiverManagement |
---|
setReceiver |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ReceiverManagement |
---|
resetReceiver |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConfigurationSupport |
---|
configure, getConfiguration |
Methods inherited from interface com.genesyslab.platform.commons.protocol.EndpointSupport |
---|
getEndpoint, setEndpoint |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ProtocolDescriptionSupport |
---|
getProtocolDescription |
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncInvokerSupport |
---|
setInvoker |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConnectionInvokerSupport |
---|
setConnectionInvoker |
Method Detail |
---|
ClusterProtocolPolicy policy()
void setNodes(WSConfig... nodes)
nodes
- list of cluster nodes configuration.
java.lang.IllegalArgumentException
- in the following cases:
given nodes list is null
, it contains null
value,
or there is an unnamed WSConfig.void setNodes(java.lang.Iterable<WSConfig> nodes)
nodes
- collection of cluster nodes configuration.
java.lang.IllegalArgumentException
- in the following cases:
given nodes collection is null
, it contains null
value,
or there is an unnamed WSConfig.void setNodesEndpoints(Endpoint... endpoints)
endpoints
- list of cluster nodes Endpoint's.
java.lang.IllegalArgumentException
- in the following cases:
given Endpoint's list is null
, it contains null
value,
or there is an unnamed Endpoint.void setNodesEndpoints(java.lang.Iterable<Endpoint> endpoints)
endpoints
- collection of cluster nodes Endpoint's.
java.lang.IllegalArgumentException
- in the following cases:
given Endpoint's collection is null
, it contains null
value,
or there is an unnamed Endpoint.void addNodes(WSConfig... nodes)
nodes
- list of cluster nodes configuration.
java.lang.IllegalArgumentException
- in the following cases:
given nodes list is null
, it contains null
value,
or there is an unnamed WSConfig.void addNodes(java.lang.Iterable<WSConfig> nodes)
nodes
- connection of cluster nodes configurations.
java.lang.IllegalArgumentException
- in the following cases:
given nodes collection is null
, it contains null
value,
or there is an unnamed WSConfig.void addNodesEndpoints(Endpoint... endpoints)
endpoints
- list of cluster nodes Endpoint's.
java.lang.IllegalArgumentException
- in the following cases:
given Endpoint's list is null
, it contains null
value,
or there is an unnamed Endpoint.void addNodesEndpoints(java.lang.Iterable<Endpoint> endpoints)
endpoints
- collection of cluster nodes Endpoint's.
java.lang.IllegalArgumentException
- in the following cases:
given Endpoint's collection is null
, it contains null
value,
or there is an unnamed Endpoint.void removeNodes(java.lang.String... names)
names
- list of Endpoint's/WSConfig's names.void removeNodes(java.lang.Iterable<java.lang.String> names)
names
- collection of Endpoint's/WSConfig's names.java.util.List<WSConfig> getNodesConfig()
<A> void openAsync(CompletionHandler<ChannelOpenedEvent,? super A> handler, A attachment) throws ProtocolException
handler
- the completion handler to be notified with the operation result.attachment
- user defined optional attachment for the handler.
ProtocolException
<A> void closeAsync(CompletionHandler<ChannelClosedEvent,? super A> handler, A attachment)
handler
- the completion handler to be notified with the operation result.attachment
- user defined optional attachment for the handler.Protocol getNextAvailableProtocol()
ClusterProtocolLoadBalancer
Protocol getNextAvailableProtocol(Message message)
message
- the protocol message.
ClusterProtocolLoadBalancer
,
ClusterProtocolLoadBalancer.chooseNode(Message)
java.util.List<Protocol> getOpenedNodesProtocols()
Opened
at the moment.
java.util.List<Protocol> getAllNodesProtocols()
Protocol getNodeProtocol(int protocolId)
ProtocolId
of specific response, or unsolicited event message.
protocolId
- the protocol id.
null
.Protocol getNodeProtocol(java.lang.String nodeName)
Endpoint
or WSConfig
.
nodeName
- name of configured Endpoint
or WSConfig
.
null
.
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |