|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.proxy.AbstractProxyServiceLoadBalancer
com.tangosol.net.proxy.DefaultProxyServiceLoadBalancer
public class DefaultProxyServiceLoadBalancer
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.
Field Summary | |
---|---|
protected ProxyServiceLoad |
m_loadLocal The ProxyServiceLoad associated with the "local" Member. |
protected java.util.Map |
m_mapLoad A Map of ProxyServiceLoad objects keyed by their associated Member. |
protected java.util.SortedMap |
m_mapMember A SortedMap of Member objects keyed by their associated ProxyServiceLoad. |
Fields inherited from class com.tangosol.net.proxy.AbstractProxyServiceLoadBalancer |
---|
m_service |
Constructor Summary | |
---|---|
DefaultProxyServiceLoadBalancer() Default constructor. |
|
DefaultProxyServiceLoadBalancer(java.util.Comparator comparator) Create a new DefaultProxyServiceLoadBalancer that will order ProxyServiceLoad objects using the specified Comparator. |
Method Summary | |
---|---|
java.util.List |
getMemberList(Member client) Called by the ProxyService when a new client connects to obtain an ordered list of Members to which the new client should be redirected. |
void |
update(Member member, ProxyServiceLoad load) Update the load balancing strategy in response to a change in a ProxyService utilization. |
Methods inherited from class com.tangosol.net.proxy.AbstractProxyServiceLoadBalancer |
---|
getLocalMember, getService, init, isLocalMember |
Field Detail |
---|
protected ProxyServiceLoad m_loadLocal
protected final java.util.Map m_mapLoad
protected final java.util.SortedMap m_mapMember
Constructor Detail |
---|
public DefaultProxyServiceLoadBalancer()
public DefaultProxyServiceLoadBalancer(java.util.Comparator comparator)
comparator
- the Comparator used to order ProxyServiceLoad objectsMethod Detail |
---|
public void update(Member member, ProxyServiceLoad load)
member
- the Member for which the utilization changedload
- the updated ProxyServiceLoad; if null, the utilization for the specified Member is unknown (e.g. when the ProxyService on the specified Member leaves the cluster)public java.util.List getMemberList(Member client)
client
- the Member object that represents the remote client
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |