CL - public class BagOfConnectionsConnectionPoolImpl<CL> extends AbstractHostPartitionConnectionPool<CL>
Topology for all the pools and then selects a pool at random using randomIndex
For AbstractHostPartitionConnectionPool.executeWithFailover(Operation, com.netflix.astyanax.retry.RetryPolicy) it just fails over to the next pool in the list of pools
starting at the random index.AbstractHostPartitionConnectionPool} for the base class that provides the rest of the functionality,
Topology} and {@link TokenPartitionedTopology} for details on where this class gets it list of host connection pools to randomly index overconfig, factory, hosts, monitor, partitioner, topology| Constructor and Description |
|---|
BagOfConnectionsConnectionPoolImpl(ConnectionPoolConfiguration config,
ConnectionFactory<CL> factory,
ConnectionPoolMonitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
<R> ExecuteWithFailover<CL,R> |
newExecuteWithFailover(Operation<CL,R> op)
Return a new failover context.
|
protected boolean |
returnConnection(Connection<CL> connection) |
addHost, executeWithFailover, getActivePools, getHostPool, getPartitioner, getPools, getTopology, hasHost, isHostUp, newHostConnectionPool, onHostDown, onHostUp, rebuildPartitions, removeHost, setHosts, shutdown, startpublic BagOfConnectionsConnectionPoolImpl(ConnectionPoolConfiguration config, ConnectionFactory<CL> factory, ConnectionPoolMonitor monitor)
config - factory - monitor - protected boolean returnConnection(Connection<CL> connection)
public <R> ExecuteWithFailover<CL,R> newExecuteWithFailover(Operation<CL,R> op) throws ConnectionException
AbstractHostPartitionConnectionPoolnewExecuteWithFailover in class AbstractHostPartitionConnectionPool<CL>ConnectionException