CL - public interface ConnectionPool<CL>
| Modifier and Type | Method and Description |
|---|---|
boolean |
addHost(Host host,
boolean refresh)
Add a host to the connection pool.
|
<R> OperationResult<R> |
executeWithFailover(Operation<CL,R> op,
RetryPolicy retry)
Execute an operation with failover within the context of the connection
pool.
|
java.util.List<HostConnectionPool<CL>> |
getActivePools() |
HostConnectionPool<CL> |
getHostPool(Host host) |
Partitioner |
getPartitioner() |
java.util.List<HostConnectionPool<CL>> |
getPools() |
Topology<CL> |
getTopology() |
boolean |
hasHost(Host host) |
boolean |
isHostUp(Host host) |
boolean |
removeHost(Host host,
boolean refresh)
Remove a host from the connection pool.
|
void |
setHosts(java.util.Collection<Host> hosts)
Set the complete set of hosts in the ring
|
void |
shutdown()
Shut down the connection pool and terminate all existing connections
|
void |
start()
Setup the connection pool and start any maintenance threads
|
boolean addHost(Host host, boolean refresh)
host - ConnectionExceptionboolean removeHost(Host host, boolean refresh)
host - boolean isHostUp(Host host)
host - boolean hasHost(Host host)
host - java.util.List<HostConnectionPool<CL>> getActivePools()
java.util.List<HostConnectionPool<CL>> getPools()
void setHosts(java.util.Collection<Host> hosts)
hosts - HostConnectionPool<CL> getHostPool(Host host)
host - <R> OperationResult<R> executeWithFailover(Operation<CL,R> op, RetryPolicy retry) throws ConnectionException, OperationException
R - op - token - ConnectionExceptionOperationExceptionvoid shutdown()
void start()
Topology<CL> getTopology()
Partitioner getPartitioner()