|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object me.prettyprint.cassandra.connection.HConnectionManager
public class HConnectionManager
Constructor Summary | |
---|---|
HConnectionManager(String clusterName,
CassandraHostConfigurator cassandraHostConfigurator)
|
Method Summary | |
---|---|
boolean |
addCassandraHost(CassandraHost cassandraHost)
Returns true if the host was successfully added. |
long |
createClock()
|
Collection<HClientPool> |
getActivePools()
|
String |
getClusterName()
|
Set<CassandraHost> |
getDownedHosts()
|
Set<CassandraHost> |
getHosts()
|
List<String> |
getStatusPerPool()
|
Set<CassandraHost> |
getSuspendedCassandraHosts()
Returns a Set of CassandraHost which are in the suspended status |
HOpTimer |
getTimer()
|
void |
operateWithFailover(Operation<?> op)
|
boolean |
removeCassandraHost(CassandraHost cassandraHost)
Remove the CassandraHost from the pool, bypassing retry service. |
void |
setTimer(HOpTimer timer)
|
void |
shutdown()
|
boolean |
suspendCassandraHost(CassandraHost cassandraHost)
Remove the HClientPool referenced by the CassandraHost from
the active host pools. |
boolean |
unsuspendCassandraHost(CassandraHost cassandraHost)
The opposite of suspendCassandraHost, places the pool back into selection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HConnectionManager(String clusterName, CassandraHostConfigurator cassandraHostConfigurator)
Method Detail |
---|
public boolean addCassandraHost(CassandraHost cassandraHost)
cassandraHost
-
public boolean removeCassandraHost(CassandraHost cassandraHost)
CassandraHost
from the pool, bypassing retry service. This
would be called on a host that is known to be going away. Gracefully shuts down
the underlying connections via HClientPool.shutdown()
. This method
will also:
CassandraHostRetryService
if contained therein
cassandraHost
- public boolean suspendCassandraHost(CassandraHost cassandraHost)
HClientPool
referenced by the CassandraHost
from
the active host pools. This does not shut down the pool, only removes it as a candidate from
future operations.
cassandraHost
-
public boolean unsuspendCassandraHost(CassandraHost cassandraHost)
cassandraHost
-
public Set<CassandraHost> getSuspendedCassandraHosts()
CassandraHost
which are in the suspended status
public Set<CassandraHost> getHosts()
public List<String> getStatusPerPool()
public void operateWithFailover(Operation<?> op) throws HectorException
HectorException
public HOpTimer getTimer()
public void setTimer(HOpTimer timer)
public Set<CassandraHost> getDownedHosts()
public Collection<HClientPool> getActivePools()
public long createClock()
public String getClusterName()
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |