public class ConcurrentHClientPool extends Object implements HClientPool
| Constructor and Description |
|---|
ConcurrentHClientPool(HClientFactory clientFactory,
CassandraHost host,
CassandraClientMonitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
HClient |
borrowClient() |
CassandraHost |
getCassandraHost() |
long |
getExhaustedTime() |
boolean |
getIsActive() |
int |
getMaxActive() |
String |
getName() |
int |
getNumActive() |
int |
getNumBeforeExhausted() |
int |
getNumBlockedThreads() |
int |
getNumIdle() |
String |
getStatusAsString() |
boolean |
isExhausted() |
void |
releaseClient(HClient client) |
void |
shutdown()
Controlled shutdown of pool.
|
public ConcurrentHClientPool(HClientFactory clientFactory, CassandraHost host, CassandraClientMonitor monitor)
public HClient borrowClient() throws HectorException
borrowClient in interface HClientPoolHectorExceptionpublic void shutdown()
HClient.close() on each. Toggles
a flag to indicate we are going into shutdown mode. Any subsequent calls
will throw an IllegalArgumentException.shutdown in interface HClientPoolpublic CassandraHost getCassandraHost()
getCassandraHost in interface HClientPoolpublic String getName()
getName in interface PoolMetricpublic int getNumActive()
getNumActive in interface PoolMetricpublic int getNumBeforeExhausted()
getNumBeforeExhausted in interface HClientPoolpublic int getNumBlockedThreads()
getNumBlockedThreads in interface PoolMetricpublic int getNumIdle()
getNumIdle in interface PoolMetricpublic boolean isExhausted()
isExhausted in interface HClientPoolpublic int getMaxActive()
getMaxActive in interface HClientPoolpublic boolean getIsActive()
getIsActive in interface PoolMetricpublic long getExhaustedTime()
getExhaustedTime in interface PoolMetricpublic String getStatusAsString()
getStatusAsString in interface HClientPoolpublic void releaseClient(HClient client) throws HectorException
releaseClient in interface HClientPoolHectorExceptionCopyright © 2014. All Rights Reserved.