|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.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. |
void |
addListener(String listenerName,
ConnectionManagerListener listener)
adds a listener in order to execute some operations when a status of a host changes |
long |
createClock()
|
void |
doAddNodes()
|
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)
|
void |
removeAllListeners()
removes all listeners from the connectionManager |
boolean |
removeCassandraHost(CassandraHost cassandraHost)
Remove the CassandraHost from the pool, bypassing retry service. |
void |
removeListener(String listenerName)
removes a listener from the connectionManager |
void |
setCassandraHostRetryDelay(int retryDelay)
|
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 void doAddNodes()
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
HectorExceptionpublic HOpTimer getTimer()
public void setTimer(HOpTimer timer)
public void addListener(String listenerName,
ConnectionManagerListener listener)
listenerName - - a name identifier for the listenerlistener - - a ConnectionManagerListener listenerpublic void removeListener(String listenerName)
listenerName - - the name of the listener to removepublic void removeAllListeners()
public Set<CassandraHost> getDownedHosts()
public Collection<HClientPool> getActivePools()
public long createClock()
public String getClusterName()
public void shutdown()
public void setCassandraHostRetryDelay(int retryDelay)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||