@Override public void close() throws IOException { statusCache.close(); }
public void stop() { try { cache.close(); cacheExecutor.shutdownNow(); } catch (Exception ex) { log.error(ex, "Failed to stop node watcher for type [%s].", nodeType); } } }
@Override public void destroy() { for (PathChildrenCache childrenCache : pathChildrenCaches.values()) { try { childrenCache.close(); } catch (IOException ignored) {} } configClient.close(); }
@Override public void destroy() { for (PathChildrenCache childrenCache : pathChildrenCaches.values()) { try { childrenCache.close(); } catch (IOException ignored) {} } configClient.close(); }
private void closePathChildrenCache(Map<String, PathChildrenCache> map) { for (Map.Entry<String, PathChildrenCache> entry : map.entrySet()) { try { entry.getValue().close(); } catch (Exception e) { LOGGER.error("Close PathChildrenCache error!", e); } } }
private void closePathChildrenCache(Map<String, PathChildrenCache> map) { for (Map.Entry<String, PathChildrenCache> entry : map.entrySet()) { try { entry.getValue().close(); } catch (Exception e) { LOGGER.error("Close PathChildrenCache error!", e); } } }
@Override public void close() { super.close(); try { pathChildrenCache.close(); } catch (IOException e) { logger.warn("Failed to close PathChildrenCache:", e); } finally { if (internalClient) { try { client.close(); } catch (Exception e) { logger.warn("Failed to close CuratorFramework:", e); } } } } }
@LifecycleStop public void stop() { log.info("Stopping ZkCoordinator for [%s]", me); synchronized (lock) { if (!started) { return; } try { loadQueueCache.close(); } catch (Exception e) { throw Throwables.propagate(e); } finally { loadQueueCache = null; started = false; } } }
@LifecycleStop public void stop() throws IOException { synchronized (lock) { if (childrenCache == null) { return; } // This close() call actually calls shutdownNow() on the executor registered with the Cache object... childrenCache.close(); childrenCache = null; } Closer closer = Closer.create(); for (ContainerHolder containerHolder : containers.values()) { closer.register(containerHolder.getCache()); } try { closer.close(); } finally { pathChildrenCacheExecutor.shutdown(); } }
public void stopListener() { try { if (start.compareAndSet(true, false)) { childrenCache.getListenable().removeListener(childrenCacheListener); childrenCache.clear(); childrenCache.close(); } } catch (IOException e) { throw new ZkException(e); } } }
public void stopListener() { try { if (start.compareAndSet(true, false)) { childrenCache.getListenable().removeListener(childrenCacheListener); childrenCache.clear(); childrenCache.close(); } } catch (IOException e) { throw new ZkException(e); } } }
@LifecycleStop @Override public void stop() throws Exception { super.stop(); synchronized (lifecycleLock) { Preconditions.checkState(started, "not started"); try { started = false; pathChildrenCache.close(); log.info("Stopped WorkerTaskMonitor."); } catch (Exception e) { log.makeAlert(e, "Exception stopping WorkerTaskMonitor") .emit(); } } }
@After public void tearDown() throws Exception { loadQueuePeon.stop(); pathChildrenCache.close(); tearDownServerAndCurator(); }
@After public void tearDown() throws Exception { loadQueueCache.close(); loadQueuePeon.stop(); tearDownServerAndCurator(); } }
if (childrenCache != null) { try { childrenCache.close(); } catch (Exception e) { if (!RpcRunningState.isShuttingDown()) {
if (childrenCache != null) { try { childrenCache.close(); } catch (Exception e) { if (!RpcRunningState.isShuttingDown()) {
newChildrenCache.close(); } catch (IOException e) { if (logger.isWarnEnabled()) {