org.scale7.cassandra.pelops.pool
Class LeastLoadedNodeSelectionStrategy
java.lang.Object
org.scale7.cassandra.pelops.pool.LeastLoadedNodeSelectionStrategy
- All Implemented Interfaces:
- CommonsBackedPool.INodeSelectionStrategy
public class LeastLoadedNodeSelectionStrategy
- extends Object
- implements CommonsBackedPool.INodeSelectionStrategy
Selects a node based on the number of connections a node currently has in use. The node that has the least active
connections will be chosen.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LeastLoadedNodeSelectionStrategy
public LeastLoadedNodeSelectionStrategy()
select
public org.scale7.cassandra.pelops.pool.PooledNode select(CommonsBackedPool pool,
Set<String> nodeAddresses,
String notNodeHint)
- Description copied from interface:
CommonsBackedPool.INodeSelectionStrategy
- Called when a node need to be selected.
- Specified by:
select
in interface CommonsBackedPool.INodeSelectionStrategy
- Parameters:
pool
- the pool (just in case you need it)nodeAddresses
- the node addresses to select fromnotNodeHint
- a hint of the node address that the selection strategy should avoid (possible null)
- Returns:
- the selected node (null if none are available)
Copyright © 2011. All Rights Reserved.