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

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


            } catch (Exception e) {
                LOG.warn("Tried to create path " + path + " but got: " + e, e);
            }
        }

        apiCache = new PathChildrenCache(curatorFramework, path, false);
        apiCache.getListenable().addListener(new PathChildrenCacheListener() {
            @Override
            public void childEvent(CuratorFramework curatorFramework, PathChildrenCacheEvent event) throws Exception {
                try {
                    LOG.debug("event: " + event);
View Full Code Here


    @Override
    public synchronized void start() {
        try {
            ZooKeeperUtils.createDefault(curator, partitionsPath, null);
            if (partitionCache == null) {
                partitionCache = new PathChildrenCache(curator, partitionsPath, true, false, executorService);
                partitionCache.getListenable().addListener(this);
                partitionCache.start(PathChildrenCache.StartMode.POST_INITIALIZED_EVENT);
                partitionCache.rebuild();
            }
        } catch (Exception e) {
View Full Code Here

  public ZooKeeperHealthChecker(final ZooKeeperClient zooKeeperClient, final String path,
                                final RiemannFacade facade, final TimeUnit timeUnit,
                                final long interval) {
    super();
    this.scheduler = Executors.newScheduledThreadPool(2);
    this.cache = new PathChildrenCache(zooKeeperClient.getCuratorFramework(), path, true, false,
        scheduler);
    this.facade = facade.stack("zookeeper-connection");
    this.timeUnit = timeUnit;
    this.interval = interval;
View Full Code Here

        this.client = client;
        this.defaults = defaults;
        this.hostname = hostname;
        configPath = ZKPaths.makePath(baseZPath, CONFIG_PATH);
        lockPath = ZKPaths.makePath(baseZPath, LOCK_PATH);
        cache = new PathChildrenCache(client, configPath, true);
    }
View Full Code Here

TOP

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

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.