|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
CL - public interface ConnectionPool<CL>
Base interface for a pool of connections. A concrete connection pool will track hosts in a cluster.
| Method Summary | ||
|---|---|---|
boolean |
addHost(Host host,
boolean refresh)
Add a host to the connection pool. |
|
|
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 |
|
| Method Detail |
|---|
boolean addHost(Host host,
boolean refresh)
host -
ConnectionException
boolean 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 -
ConnectionException
OperationExceptionvoid shutdown()
void start()
Topology<CL> getTopology()
Partitioner getPartitioner()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||