private void close() { if (cache != null) { try { cache.close(); } catch (IOException e) { // should not happen throw new AssertionError(e); } cache = null; } if (client != null) { client.close(); client = null; } }
@Override public void close() throws Exception { if (this.nodeCache != null) { this.nodeCache.getListenable().removeListener(listener); this.nodeCache.close(); } if (this.zkClient != null) { this.zkClient.close(); } pool.shutdown(); }
@Override public void stop() { LOGGER.debug("Stopping..."); if (agentNodeCache != null) { try { agentNodeCache.close(); } catch (IOException e) { LOGGER.warn("Encountered exception while stopping", e); lifecycleState = LifecycleState.ERROR; } } try { client.close(); } catch (Exception e) { LOGGER.warn("Error stopping Curator client", e); lifecycleState = LifecycleState.ERROR; } if (lifecycleState != LifecycleState.ERROR) { lifecycleState = LifecycleState.STOP; } }
@Override public void close() throws IOException { LOG.info("Closing"); listeners.clear(); if (controlCache != null) { controlCache.close(); } if (nodePath != null) { try { zkClient.delete().forPath(nodePath); LOG.debug("Node with path {} successfully deleted", nodePath); } catch (Exception ex) { LOG.debug("Failed to delete node", ex); } } }
public void stopListener() { try { if (start.compareAndSet(true, false)) { nodeCache.getListenable().removeListener(nodeCacheListener); nodeCache.close(); } } catch (IOException e) { throw new ZkException(e); } } }
public void stopListener() { try { if (start.compareAndSet(true, false)) { nodeCache.getListenable().removeListener(nodeCacheListener); nodeCache.close(); } } catch (IOException e) { throw new ZkException(e); } } }
public void shutdown() { try { if (cache != null) { cache.close(); } } catch (Exception ex) { log.warn("cache close failed", ex); } if (client != null) { client.close(); } }
@Override public void close() throws IOException { if (client == null) { return; } // close all node cache for (Map.Entry<String, NodeCache> entry : nodeCaches.entrySet()) { NodeCache value = entry.getValue(); value.close(); } // close all children cache for (Map.Entry<String, PathChildrenCache> entry : nodeChildrenCache.entrySet()) { PathChildrenCache value = entry.getValue(); value.close(); } // close all tree cache for (Map.Entry<String, TreeCache> entry : nodeTreeCache.entrySet()) { TreeCache value = entry.getValue(); value.close(); } if (client.getState() == CuratorFrameworkState.STARTED) { client.close(); } }
public void stop(){ if (node != null){ try { node.close(); } catch (IOException e) { // ignore } } } }
public void close() { try { jobCache.close(); } catch (IOException ex) { // do not need any process } } }
/** {@inheritDoc}. */ @Override public void close() throws IOException { mCache.close(); mExecutor.shutdown(); }
@Override public void removeEntryListener(String path) throws Exception { NodeCache nodeCache = entryNodeCaches.remove(path); if (nodeCache != null) { nodeCache.close(); } }
@Override public void close() { try { wrapped.close(); } catch (IOException e) { throw new RuntimeException("Exception closing curator cache", e); } }
@Override public void close() throws IOException { super.close(); nodeCache.close(); }
@Override public void close() throws Exception { if (this.nodeCache != null) { this.nodeCache.getListenable().removeListener(listener); this.nodeCache.close(); } if (this.zkClient != null) { this.zkClient.close(); } pool.shutdown(); }
@PreDestroy public void stop() throws IOException { consumerTreeCache.close(); topicConfigPathCache.close(); brokerPathCache.close(); controllerNodeCache.close(); }
public void stopListener() { try { if (start.compareAndSet(true, false)) { nodeCache.getListenable().removeListener(nodeCacheListener); nodeCache.close(); } } catch (IOException e) { throw new ZkException(e); } } }
@Override public void stop() { try { oracleServer.stop(); appIdCache.close(); reporters.close(); env.close(); } catch (Exception e) { throw new FluoException(e); } }
@Override public void stop() { try { notificationFinder.stop(); np.close(); appIdCache.close(); reporters.close(); env.close(); } catch (Exception e) { throw new FluoException(e); } }
@Override public void stop() { try { notificationFinder.stop(); np.close(); appIdCache.close(); reporters.close(); env.close(); } catch (Exception e) { throw new FluoException(e); } }