|
||||||||||
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. |
|
List<HostConnectionPool<CL>> |
getActivePools()
Return list of active hosts on which connections can be created |
|
HostConnectionPool<CL> |
getHostPool(Host host)
Return an immutable connection pool for this host |
|
boolean |
hasHost(Host host)
Return true if host is contained within the connection pool |
|
boolean |
isHostUp(Host host)
Return true if the host is up |
|
boolean |
removeHost(Host host,
boolean refresh)
Remove a host from the connection pool. |
|
void |
setHosts(Map<BigInteger,List<Host>> ring)
Sets the complete set of hosts keyed by token. |
|
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
-
List<HostConnectionPool<CL>> getActivePools()
void setHosts(Map<BigInteger,List<Host>> ring)
ring
- HostConnectionPool<CL> getHostPool(Host host)
host
-
<R> OperationResult<R> executeWithFailover(Operation<CL,R> op, RetryPolicy retry) throws ConnectionException, OperationException
R
- op
- token
-
ConnectionException
OperationException
void shutdown()
void start()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |