@Override public void close() { for (HealthCheck healthCheck : _badEndPoints.values()) { healthCheck.cancel(true); } _hostDiscovery.removeListener(_hostDiscoveryListener); if (_cleanupHostDiscoveryOnClose) { try { _hostDiscovery.close(); } catch (IOException e) { // NOP } } _serviceCache.close(); _metrics.close(); if (_shutdownHealthCheckExecutorOnClose) { _healthCheckExecutor.shutdownNow(); } }
@Override public void close() { for (HealthCheck healthCheck : _badEndPoints.values()) { healthCheck.cancel(true); } _hostDiscovery.removeListener(_hostDiscoveryListener); if (_cleanupHostDiscoveryOnClose) { try { _hostDiscovery.close(); } catch (IOException e) { // NOP } } _serviceCache.close(); _metrics.close(); if (_shutdownHealthCheckExecutorOnClose) { _healthCheckExecutor.shutdownNow(); } }