Class DefaultProxyServiceLoadBalancer

All Implemented Interfaces:
ProxyServiceLoadBalancer, ServiceLoadBalancer<ProxyService,ProxyServiceLoad>, Comparator<ProxyServiceLoad>

public class DefaultProxyServiceLoadBalancer extends SimpleServiceLoadBalancer<ProxyService,ProxyServiceLoad> implements ProxyServiceLoadBalancer
Default ProxyServiceLoadBalancer implementation.

This implementation will redirect a new client connection to another ProxyService Member if a less utilized Member is identified. A Member is considered less utilized than another iff it's associated ProxyServiceLoad object is less than the ProxyServiceLoad of the other Member according to the Comparator specified during construction. By default, the natural ordering of the ProxyServiceLoad objects is used.

Author:
jh 2010.12.10
  • Field Details

    • m_loadLocal

      protected ProxyServiceLoad m_loadLocal
      The ServiceLoad associated with the "local" Member.
  • Constructor Details

    • DefaultProxyServiceLoadBalancer

      public DefaultProxyServiceLoadBalancer()
      Default constructor.
    • DefaultProxyServiceLoadBalancer

      public DefaultProxyServiceLoadBalancer(Comparator comparator)
      Create a new DefaultProxyServiceLoadBalancer that will order ProxyServiceLoad objects using the specified Comparator. If null, the natural ordering of the ProxyServiceLoad objects will be used.
      Parameters:
      comparator - the Comparator used to order ProxyServiceLoad objects
  • Method Details