Package com.google.common.util.concurrent

Examples of com.google.common.util.concurrent.AbstractIdleService


        RunId runId = RunIds.generate();
        final Semaphore semaphore = new Semaphore(0);
        ZKServiceDecorator service = new ZKServiceDecorator(ZKClients.namespace(zkClient, namespace),
                                                            runId, Suppliers.ofInstance(content),
                                                            new AbstractIdleService() {
          @Override
          protected void startUp() throws Exception {
            Preconditions.checkArgument(semaphore.tryAcquire(5, TimeUnit.SECONDS), "Fail to start");
          }
View Full Code Here


    }
  }

  private Service createService(ZKClient zkClient, RunId runId) {
    return new ZKServiceDecorator(
      zkClient, runId, Suppliers.ofInstance(new JsonObject()), new AbstractIdleService() {

      @Override
      protected void startUp() throws Exception {
        LOG.info("Start");
      }
View Full Code Here

    }
  }

  private Service createService(ZKClient zkClient, RunId runId) {
    return new ZKServiceDecorator(
      zkClient, runId, Suppliers.ofInstance(new JsonObject()), new AbstractIdleService() {

      @Override
      protected void startUp() throws Exception {
        LOG.info("Start");
      }
View Full Code Here

TOP

Related Classes of com.google.common.util.concurrent.AbstractIdleService

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.