Examples of waitForKeeperState()


Examples of org.I0Itec.zkclient.ZkClient.waitForKeeperState()

    };
    client.subscribeStateChanges(stateChangeListener);
    boolean waitUntilConnected = client.waitUntilConnected(10000,
        TimeUnit.MILLISECONDS);
    System.out.println("Connected " + waitUntilConnected);
    client.waitForKeeperState(KeeperState.Disconnected, 20000,
        TimeUnit.MILLISECONDS);
    // server.start();
    client.waitUntilConnected();
    Thread.currentThread().join();
  }
View Full Code Here

Examples of org.I0Itec.zkclient.ZkClient.waitForKeeperState()

    client.subscribeChildChanges("/", listener1);
    client.subscribeChildChanges("/foo", listener2);

    // server.shutdown();
    client.waitForKeeperState(KeeperState.Disconnected, 20000,
        TimeUnit.MILLISECONDS);
    // server.start();
    client.waitUntilConnected();

    Thread.sleep(1000);
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.