Package com.netflix.curator.framework.api

Examples of com.netflix.curator.framework.api.BackgroundCallback


            curator.getCuratorListenable().addListener(localListener);
            listener.set(localListener);

            try
            {
                BackgroundCallback      callback = new BackgroundCallback()
                {
                    @Override
                    public void processResult(CuratorFramework client, CuratorEvent event) throws Exception
                    {
                        WatchedEvent        fakeEvent = new WatchedEvent(Watcher.Event.EventType.None, curator.getZookeeperClient().isConnected() ? Watcher.Event.KeeperState.SyncConnected : Watcher.Event.KeeperState.Disconnected, null);
View Full Code Here


            final MyWatcher watcher = new MyWatcher(listener, possiblyWithSequence(node));
            watcher.checkEphemeral();
            watcher.setChildren();
            client.checkExists().usingWatcher(watcher).forPath(watcher.path);
           
            client.getChildren().inBackground(new BackgroundCallback() {

                @Override
                public void processResult(CuratorFramework client, CuratorEvent event) throws Exception {
                    final List<String> children = event.getChildren();
                    if(children != null) {
View Full Code Here

  public void close() {
    client.close();
  }
 
  public BackgroundCallback createTargetChildListener(String path, final ChildListener listener) {
    return new BackgroundCallback() {
      public void processResult(CuratorFramework client, CuratorEvent event)
          throws Exception {
        if (listener != null) {
          listener.childChanged(event.getPath(), event.getChildren());
        }
View Full Code Here

TOP

Related Classes of com.netflix.curator.framework.api.BackgroundCallback

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.