@Override public void evictCacheData(final String cachePath) { TreeCache cache = caches.remove(cachePath + "/"); if (null != cache) { cache.close(); } }
@Override protected void doStop(Listener listener) throws Throwable { if (cache != null) cache.close(); TimeUnit.MILLISECONDS.sleep(600); client.close(); Logs.RSD.info("zk client closed..."); listener.onSuccess(); }
@Override public void close() { for (Entry<String, TreeCache> each : caches.entrySet()) { each.getValue().close(); } waitForCacheClose(); CloseableUtils.closeQuietly(client); }
@Override public void close() { for (Entry<String, TreeCache> each : caches.entrySet()) { each.getValue().close(); } waitForCacheClose(); CloseableUtils.closeQuietly(client); }
/** * Close the cache, which closes the client if it's owned by the ZKCache. */ @Override public void close() { cache.close(); if(ownClient) { 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 close() { if (treeCache != null) treeCache.close(); }
public static void stop() { synchronized (lock) { if (serviceAware != null) serviceAware.allNodesCache.close(); serviceAware = null; } }
@PreDestroy public void stop() throws Exception { if (this.cache != null) { this.cache.close(); } }
@Override public void evictCacheData(final String cachePath) { TreeCache cache = caches.remove(cachePath + "/"); if (null != cache) { cache.close(); } }
@Override public void evictCacheData(final String cachePath) { TreeCache cache = caches.remove(cachePath + "/"); if (null != cache) { cache.close(); } }
@Override public void close() { if (this.running.compareAndSet(true, false)) { for (TreeCache cache : this.caches.values()) { cache.close(); } this.caches = null; } }
@Override public void closeCacheData(String cachePath) { try { TreeCache cache = caches.remove(cachePath + "/"); if(cache != null){ cache.close(); } } catch (Exception ex) { RegExceptionHandler.handleException(ex); } }
@Override public void stop(ILifecycleProgressMonitor monitor) throws SiteWhereException { getTreeCache().close(); if (executor != null) { executor.shutdown(); } }
@Override protected void doStop(Listener listener) throws Throwable { if (cache != null) cache.close(); TimeUnit.MILLISECONDS.sleep(600); client.close(); Logs.RSD.info("zk client closed..."); listener.onSuccess(); }
@Override public void close() { for (Entry<String, TreeCache> each : caches.entrySet()) { each.getValue().close(); } waitForCacheClose(); CloseableUtils.closeQuietly(client); }
@Override public void close() { for (Entry<String, TreeCache> each : caches.entrySet()) { each.getValue().close(); } waitForCacheClose(); CloseableUtils.closeQuietly(client); }
public void close() { cache.getListenable().removeListener(this); cache.close(); entries.clear(); }
/** * Close the ZK connection if it is open. */ @Override protected void serviceStop() throws Exception { IOUtils.closeStream(curator); if (treeCache != null) { treeCache.close(); } super.serviceStop(); }
@PreDestroy public void stop() throws IOException { consumerTreeCache.close(); topicConfigPathCache.close(); brokerPathCache.close(); controllerNodeCache.close(); }