Examples of PathChildrenCache


Examples of com.netflix.curator.framework.recipes.cache.PathChildrenCache

                .build();

        _nodes = Maps.newConcurrentMap();
        _listeners = Sets.newSetFromMap(Maps.<NodeListener<T>, Boolean>newConcurrentMap());
        _curator = curator;
        _pathCache = new PathChildrenCache(curator, nodePath, true, threadFactory);
        _nodeDataParser = parser;
        _executor = Executors.newSingleThreadScheduledExecutor(threadFactory);
        _closed = false;
    }
View Full Code Here

Examples of com.netflix.curator.framework.recipes.cache.PathChildrenCache

                .build();

        _nodes = Maps.newConcurrentMap();
        _listeners = Sets.newSetFromMap(Maps.<NodeListener<T>, Boolean>newConcurrentMap());
        _curator = curator;
        _pathCache = new PathChildrenCache(curator, nodePath, true, threadFactory);
        _nodeDataParser = parser;
        _executor = Executors.newSingleThreadScheduledExecutor(threadFactory);
        _closed = false;
    }
View Full Code Here

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

        Preconditions.checkNotNull(name, "name cannot be null");
        Preconditions.checkNotNull(threadFactory, "threadFactory cannot be null");

        this.discovery = discovery;

        cache = new PathChildrenCache(discovery.getClient(), discovery.pathForName(name), true, threadFactory);
        cache.getListenable().addListener(this);
    }
View Full Code Here

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

    public static void main(String[] args) throws Exception
    {
        TestingServer       server = new TestingServer();
        CuratorFramework    client = null;
        PathChildrenCache   cache = null;
        try
        {
            client = CuratorFrameworkFactory.newClient(server.getConnectString(), new ExponentialBackoffRetry(1000, 3));
            client.start();

            // in this example we will cache data. Notice that this is optional.
            cache = new PathChildrenCache(client, PATH, true);
            cache.start();

            processCommands(client, cache);
        }
        finally
        {
View Full Code Here

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

        _nodes = Maps.newConcurrentMap();
        _listeners = Sets.newSetFromMap(Maps.<NodeListener<T>, Boolean>newConcurrentMap());
        _curator = curator;
        _executor = Executors.newSingleThreadScheduledExecutor(threadFactory);
        _pathCache = new PathChildrenCache(curator, nodePath, true, false, _executor);
        _nodeDataParser = parser;
        _closed = false;
    }
View Full Code Here

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

                .build();

        _nodes = Maps.newConcurrentMap();
        _listeners = Sets.newSetFromMap(Maps.<NodeListener<T>, Boolean>newConcurrentMap());
        _curator = curator;
        _pathCache = new PathChildrenCache(curator, nodePath, true, threadFactory);
        _nodeDataParser = parser;
        _executor = Executors.newSingleThreadScheduledExecutor(threadFactory);
        _closed = false;
    }
View Full Code Here

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

    {
        Preconditions.checkNotNull(threadFactory, "threadFactory cannot be null");

        this.discovery = discovery;

        cache = new PathChildrenCache(discovery.getClient(), discovery.pathForName(name), true, threadFactory);
        cache.getListenable().addListener(this);
    }
View Full Code Here

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

    public static void main(String[] args) throws Exception
    {
        TestingServer       server = new TestingServer();
        CuratorFramework    client = null;
        PathChildrenCache   cache = null;
        try
        {
            client = CuratorFrameworkFactory.newClient(server.getConnectString(), new ExponentialBackoffRetry(1000, 3));
            client.start();

            // in this example we will cache data. Notice that this is optional.
            cache = new PathChildrenCache(client, PATH, true);
            cache.start();

            processCommands(client, cache);
        }
        finally
        {
View Full Code Here

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

  {
    log.info("Worker[%s] reportin' for duty!", worker.getHost());

    try {
      final String workerStatusPath = JOINER.join(zkPaths.getIndexerStatusPath(), worker.getHost());
      final PathChildrenCache statusCache = pathChildrenCacheFactory.make(cf, workerStatusPath);
      final SettableFuture<ZkWorker> retVal = SettableFuture.create();
      final ZkWorker zkWorker = new ZkWorker(
          worker,
          statusCache,
          jsonMapper
View Full Code Here

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

      final String loadQueueLocation = ZKPaths.makePath(zkPaths.getLoadQueuePath(), me.getName());
      final String servedSegmentsLocation = ZKPaths.makePath(zkPaths.getServedSegmentsPath(), me.getName());
      final String liveSegmentsLocation = ZKPaths.makePath(zkPaths.getLiveSegmentsPath(), me.getName());

      loadQueueCache = new PathChildrenCache(
          curator,
          loadQueueLocation,
          true,
          true,
          loadingExec
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.