Java Code Examples for org.apache.curator.framework.recipes.cache.TreeCache#close()

The following examples show how to use org.apache.curator.framework.recipes.cache.TreeCache#close() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ZookeeperRegistryCenter.java    From paascloud-master with Apache License 2.0 5 votes vote down vote up
/**
 * Evict cache data.
 *
 * @param cachePath the cache path
 */
@Override
public void evictCacheData(final String cachePath) {
	TreeCache cache = caches.remove(cachePath + "/");
	if (null != cache) {
		cache.close();
	}
}
 
Example 2
Source File: ZookeeperRegistryCenter.java    From shardingsphere-elasticjob-cloud with Apache License 2.0 5 votes vote down vote up
@Override
public void evictCacheData(final String cachePath) {
    TreeCache cache = caches.remove(cachePath + "/");
    if (null != cache) {
        cache.close();
    }
}
 
Example 3
Source File: ZookeeperRegistryCenter.java    From idworker with Apache License 2.0 5 votes vote down vote up
@Override
public void evictCacheData(final String cachePath) {
    TreeCache cache = caches.remove(cachePath + "/");
    if (null != cache) {
        cache.close();
    }
}
 
Example 4
Source File: ZookeeperRegistryCenter.java    From shardingsphere-elasticjob-lite with Apache License 2.0 5 votes vote down vote up
@Override
public void evictCacheData(final String cachePath) {
    TreeCache cache = caches.remove(cachePath + "/");
    if (null != cache) {
        cache.close();
    }
}
 
Example 5
Source File: ConfigWatcher.java    From spring-cloud-zookeeper with Apache License 2.0 5 votes vote down vote up
@Override
public void close() {
	if (this.running.compareAndSet(true, false)) {
		for (TreeCache cache : this.caches.values()) {
			cache.close();
		}
		this.caches = null;
	}
}