Package com.twitter.common.zookeeper

Examples of com.twitter.common.zookeeper.ServerSetImpl.watch()


    executor.submit(new Callable<Void>() {
      @Override
      public Void call() throws Exception {
        ServerSet schedulerService = new ServerSetImpl(zkClient, SERVERSET_PATH);
        final CountDownLatch schedulerReady = new CountDownLatch(1);
        schedulerService.watch(new HostChangeMonitor<ServiceInstance>() {
          @Override
          public void onChange(ImmutableSet<ServiceInstance> hostSet) {
            if (!hostSet.isEmpty()) {
              schedulerReady.countDown();
            }
View Full Code Here


    executor.submit(new Callable<Void>() {
      @Override
      public Void call() throws Exception {
        ServerSet schedulerService = new ServerSetImpl(zkClient, SERVERSET_PATH);
        final CountDownLatch schedulerReady = new CountDownLatch(1);
        schedulerService.watch(new HostChangeMonitor<ServiceInstance>() {
          @Override
          public void onChange(ImmutableSet<ServiceInstance> hostSet) {
            if (!hostSet.isEmpty()) {
              schedulerReady.countDown();
            }
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.