Package org.apache.curator.framework.recipes.cache

Examples of org.apache.curator.framework.recipes.cache.TreeCache


    }


    public void init() throws Exception {
        if (active.compareAndSet(false, true)) {
            treeCache = new TreeCache(curator, zooKeeperPath, true, false, true, treeCacheExecutor);
            treeCache.start(TreeCache.StartMode.NORMAL);
            treeCache.getListenable().addListener(treeListener);
            LOG.info("Started listening to ZK path " + zooKeeperPath);
        }
    }
View Full Code Here


    }


    public void init() throws Exception {
        if (active.compareAndSet(false, true)) {
            treeCache = new TreeCache(curator, zkPath, true, false, true, treeCacheExecutor);
            treeCache.start(TreeCache.StartMode.NORMAL);
            treeCache.getListenable().addListener(treeListener);
            LOG.info("Started a group listener for " + zkPath);
            for (TcpGateway gateway : gateways) {
                gateway.init();
View Full Code Here

        deactivateComponent();
        deactivateInternal();
    }
   
    private void activateInternal() throws Exception {
        configCache = new TreeCache(curator.get(), ZkPath.CONFIGS.getPath(), true, false, true, cacheExecutor);
        configCache.start(TreeCache.StartMode.NORMAL);
        configCache.getListenable().addListener(this);

        containerCache = new TreeCache(curator.get(), ZkPath.CONTAINERS.getPath(), true, false, true, cacheExecutor);
        containerCache.start(TreeCache.StartMode.NORMAL);
        containerCache.getListenable().addListener(this);

    }
View Full Code Here

        try {
            create(curator, DOSGI_REGISTRY, CreateMode.PERSISTENT);
        } catch (KeeperException.NodeExistsException e) {
            // The node already exists, that's fine
        }
        this.tree = new TreeCache(curator,  DOSGI_REGISTRY, true);
        this.tree.getListenable().addListener(this);
        this.tree.start();
        // UUID
        this.uuid = Utils.getUUID(this.bundleContext);
        // Service listener filter
View Full Code Here

    }


    public void init() throws Exception {
        if (active.compareAndSet(false, true)) {
            treeCache = new TreeCache(curator, zkPath, true, false, true, treeCacheExecutor);
            treeCache.getListenable().addListener(treeListener);
            treeCache.start(TreeCache.StartMode.NORMAL);
            LOG.info("Started a group listener for " + zkPath);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.curator.framework.recipes.cache.TreeCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.