me.prettyprint.cassandra.connection
Class LeastActiveBalancingPolicy
java.lang.Object
me.prettyprint.cassandra.connection.LeastActiveBalancingPolicy
- All Implemented Interfaces:
- Serializable, LoadBalancingPolicy
public class LeastActiveBalancingPolicy
- extends Object
- implements LoadBalancingPolicy
Selects the least active host based on the number of active connections.
The list of hosts is shuffled on each pass to account for the case
where a number of hosts are at the minimum number of connections
(ie. they are not busy).
- Author:
- zznate
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LeastActiveBalancingPolicy
public LeastActiveBalancingPolicy()
getPool
public HClientPool getPool(Collection<HClientPool> pools,
Set<CassandraHost> excludeHosts)
- Specified by:
getPool
in interface LoadBalancingPolicy
createConnection
public HClientPool createConnection(CassandraHost host)
- Specified by:
createConnection
in interface LoadBalancingPolicy
Copyright © 2011. All Rights Reserved.