HConnectionManager { public boolean suspendCassandraHost(CassandraHost cassandraHost) { HClientPool pool = hostPools.remove(cassandraHost); boolean removed = pool != null; if ( removed ) { suspendedHostPools.put(cassandraHost, pool); } listenerHandler.fireOnSuspendHost(cassandraHost, removed); log.info("Suspend operation status was {} for CassandraHost {}", removed, cassandraHost); return removed; } HConnectionManager(String clusterName, CassandraHostConfigurator cassandraHostConfigurator); void doAddNodes(); boolean addCassandraHost(CassandraHost cassandraHost); boolean removeCassandraHost(CassandraHost cassandraHost); boolean suspendCassandraHost(CassandraHost cassandraHost); boolean unsuspendCassandraHost(CassandraHost cassandraHost); Set<CassandraHost> getSuspendedCassandraHosts(); Set<CassandraHost> getHosts(); List<String> getStatusPerPool(); void operateWithFailover(Operation<?> op); HOpTimer getTimer(); void setTimer(HOpTimer timer); void addListener(String listenerName, ConnectionManagerListener listener); void removeListener(String listenerName); void removeAllListeners(); Set<CassandraHost> getDownedHosts(); Collection<HClientPool> getActivePools(); long createClock(); String getClusterName(); void shutdown(); void setCassandraHostRetryDelay(int retryDelay);  }
@Test public void testSuspendCassandraHost() { setupClient(); CassandraHost cassandraHost = new CassandraHost("127.0.0.1", 9170); assertTrue(connectionManager.suspendCassandraHost(cassandraHost)); assertEquals(1,connectionManager.getSuspendedCassandraHosts().size()); assertTrue(connectionManager.unsuspendCassandraHost(cassandraHost)); }