Platform SDK Java 8.5 API Reference

com.genesyslab.platform.clusterprotocol.lb
Class DefaultClusterLoadBalancer

java.lang.Object
  extended by com.genesyslab.platform.clusterprotocol.lb.DefaultClusterLoadBalancer
All Implemented Interfaces:
ClusterProtocolLoadBalancer

public class DefaultClusterLoadBalancer
extends java.lang.Object
implements ClusterProtocolLoadBalancer

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

DefaultClusterLoadBalancer

public DefaultClusterLoadBalancer()
Method Detail

configure

public void configure(ConnectionConfiguration config)
Description copied from interface: ClusterProtocolLoadBalancer
This method is to choose and apply load balancer specific options from the cluster connection configuration.

Specified by:
configure in interface ClusterProtocolLoadBalancer
Parameters:
config - connection configuration from the Cluster Protocol base Endpoint.
See Also:
ClusterProtocol.setEndpoint(Endpoint)

chooseNode

public Protocol chooseNode(Message request)
Description copied from interface: ClusterProtocolLoadBalancer
This method is to apply load balancing strategy on available cluster nodes.

Specified by:
chooseNode in interface ClusterProtocolLoadBalancer
Parameters:
request - user specified protocol message for sending (may be null).
Returns:
selected cluster protocol node.

addNode

public void addNode(Protocol item)
Description copied from interface: ClusterProtocolLoadBalancer
This method is to add just connected Cluster Protocol Node to load balancing strategy.

Specified by:
addNode in interface ClusterProtocolLoadBalancer
Parameters:
item - cluster protocol node.

removeNode

public void removeNode(Protocol item)
Description copied from interface: ClusterProtocolLoadBalancer
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.

Specified by:
removeNode in interface ClusterProtocolLoadBalancer
Parameters:
item - cluster protocol node.

clear

public void clear()
Description copied from interface: ClusterProtocolLoadBalancer
This method is called when Cluster Protocol is being closed.

Specified by:
clear in interface ClusterProtocolLoadBalancer

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.