/** * Remove host from the system. Shuts down pool associated with the host and rebuilds partition map * @param host * @param refresh */ @Override public synchronized boolean removeHost(Host host, boolean refresh) { HostConnectionPool<CL> pool = hosts.remove(host); if (pool != null) { topology.removePool(pool); rebuildPartitions(); monitor.onHostRemoved(host); pool.shutdown(); return true; } else { return false; } }
/** * Clean up resources associated with the conn pool */ @Override public void shutdown() { ConnectionPoolMBeanManager.getInstance().unregisterMonitor(config.getName(), this); for (Entry<Host, HostConnectionPool<CL>> pool : hosts.entrySet()) { pool.getValue().shutdown(); } config.getLatencyScoreStrategy().shutdown(); config.shutdown(); }
/** * Clean up resources associated with the conn pool */ @Override public void shutdown() { ConnectionPoolMBeanManager.getInstance().unregisterMonitor(config.getName(), this); for (Entry<Host, HostConnectionPool<CL>> pool : hosts.entrySet()) { pool.getValue().shutdown(); } config.getLatencyScoreStrategy().shutdown(); config.shutdown(); }
/** * Remove host from the system. Shuts down pool associated with the host and rebuilds partition map * @param host * @param refresh */ @Override public synchronized boolean removeHost(Host host, boolean refresh) { HostConnectionPool<CL> pool = hosts.remove(host); if (pool != null) { topology.removePool(pool); rebuildPartitions(); monitor.onHostRemoved(host); pool.shutdown(); return true; } else { return false; } }