me.prettyprint.cassandra.connection
Class RoundRobinBalancingPolicy
java.lang.Object
me.prettyprint.cassandra.connection.RoundRobinBalancingPolicy
- All Implemented Interfaces:
- Serializable, LoadBalancingPolicy
public class RoundRobinBalancingPolicy
- extends Object
- implements LoadBalancingPolicy
Implements a RoundRobin balancing policy based off the contents
of the active HClientPool
. If a pool is shutdown by another
thread in the midst of the selection process, we return the pool
at position 0
- Author:
- zznate
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoundRobinBalancingPolicy
public RoundRobinBalancingPolicy()
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.