@Override public void shutdown() { cassandra.close(); refreshDaemon.shutdown(); cassandra.getPools().forEach((address, cassandraClientPoolingContainer) -> cassandraClientPoolingContainer.shutdownPooling()); }
private void cleanUpOnInitFailure() { refreshPoolFuture.cancel(true); cassandra.getPools().forEach((address, cassandraClientPoolingContainer) -> cassandraClientPoolingContainer.shutdownPooling()); cassandra.getPools().clear(); cassandra.clearInitialCassandraHosts(); }
public void removePool(InetSocketAddress removedServerAddress) { blacklist.remove(removedServerAddress); try { currentPools.get(removedServerAddress).shutdownPooling(); } catch (Exception e) { log.warn("While removing a host ({}) from the pool, we were unable to gently cleanup resources.", SafeArg.of("removedServerAddress", CassandraLogHelper.host(removedServerAddress)), e); } currentPools.remove(removedServerAddress); }
@Override public void shutdown() { cassandra.close(); refreshDaemon.shutdown(); cassandra.getPools().forEach((address, cassandraClientPoolingContainer) -> cassandraClientPoolingContainer.shutdownPooling()); }
public void removePool(InetSocketAddress removedServerAddress) { blacklist.remove(removedServerAddress); try { currentPools.get(removedServerAddress).shutdownPooling(); } catch (Exception e) { log.warn("While removing a host ({}) from the pool, we were unable to gently cleanup resources.", SafeArg.of("removedServerAddress", CassandraLogHelper.host(removedServerAddress)), e); } currentPools.remove(removedServerAddress); }
private void cleanUpOnInitFailure() { refreshPoolFuture.cancel(true); cassandra.getPools().forEach((address, cassandraClientPoolingContainer) -> cassandraClientPoolingContainer.shutdownPooling()); cassandra.getPools().clear(); cassandra.clearInitialCassandraHosts(); }