Examples of NodeCacheListener


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

    try {
      client.start();
      try {
        agentNodeCache = new NodeCache(client, basePath + "/" + getAgentName());
        agentNodeCache.start();
        agentNodeCache.getListenable().addListener(new NodeCacheListener() {
          @Override
          public void nodeChanged() throws Exception {
            refreshConfiguration();
          }
        });
View Full Code Here

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

  ) {
    mHandler = handler;
    mTableURI = tableURI;
    mCache = new NodeCache(zkClient, ZooKeeperUtils.getTableLayoutFile(mTableURI).getPath());
    mExecutor = Executors.newSingleThreadExecutor(THREAD_FACTORY);
    mCache.getListenable().addListener(new NodeCacheListener() {
      /** {@inheritDoc}. */
      @Override
      public void nodeChanged() throws Exception {
        mHandler.update(getLayoutID());
      }
View Full Code Here

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

                    }
                }
            };
            String id = entry.addThing(cache, closer);

            NodeCacheListener listener = new NodeCacheListener()
            {
                @Override
                public void nodeChanged()
                {
                    entry.addEvent(new RpcCuratorEvent(RpcCuratorEventType.NODE_CACHE, path));
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.