|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.clusterprotocol.lb.DefaultClusterLoadBalancer
public class DefaultClusterLoadBalancer
Default Cluster Protocol Load Balancer.
It implements simple "round robin" strategy on available cluster nodes.
Constructor Summary | |
---|---|
DefaultClusterLoadBalancer()
|
Method Summary | |
---|---|
void |
addNode(Protocol item)
This method is to add just connected Cluster Protocol Node to load balancing strategy. |
Protocol |
chooseNode(Message request)
This method is to apply load balancing strategy on available cluster nodes. |
void |
clear()
This method is called when Cluster Protocol is being closed. |
void |
configure(ConnectionConfiguration config)
This method is to choose and apply load balancer specific options from the cluster connection configuration. |
void |
removeNode(Protocol item)
This method is to remove Cluster Protocol Node from load balancing strategy. Its called when node is removed from the cluster, or its protocol connection is lost. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultClusterLoadBalancer()
Method Detail |
---|
public void configure(ConnectionConfiguration config)
ClusterProtocolLoadBalancer
configure
in interface ClusterProtocolLoadBalancer
config
- connection configuration from the Cluster Protocol base Endpoint.ClusterProtocol.setEndpoint(Endpoint)
public Protocol chooseNode(Message request)
ClusterProtocolLoadBalancer
chooseNode
in interface ClusterProtocolLoadBalancer
request
- user specified protocol message for sending (may be null
).
public void addNode(Protocol item)
ClusterProtocolLoadBalancer
addNode
in interface ClusterProtocolLoadBalancer
item
- cluster protocol node.public void removeNode(Protocol item)
ClusterProtocolLoadBalancer
removeNode
in interface ClusterProtocolLoadBalancer
item
- cluster protocol node.public void clear()
ClusterProtocolLoadBalancer
clear
in interface ClusterProtocolLoadBalancer
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |