Search in sources :

Example 6 with TreeCache

use of org.apache.curator.framework.recipes.cache.TreeCache in project elastic-job by dangdangdotcom.

the class ZookeeperRegistryCenter method addCacheData.

@Override
public void addCacheData(final String cachePath) {
    TreeCache cache = new TreeCache(client, cachePath);
    try {
        cache.start();
    //CHECKSTYLE:OFF
    } catch (final Exception ex) {
        //CHECKSTYLE:ON
        RegExceptionHandler.handleException(ex);
    }
    caches.put(cachePath + "/", cache);
}
Also used : TreeCache(org.apache.curator.framework.recipes.cache.TreeCache) KeeperException(org.apache.zookeeper.KeeperException)

Aggregations

TreeCache (org.apache.curator.framework.recipes.cache.TreeCache)6 ChildData (org.apache.curator.framework.recipes.cache.ChildData)2 TreeCacheListener (org.apache.curator.framework.recipes.cache.TreeCacheListener)1 KeeperException (org.apache.zookeeper.KeeperException)1 Test (org.junit.Test)1