@Test public void testShutdown() throws Exception { final ZooKeeperRegistrar zooKeeperRegistrar = createStubRegistrar(true); final ZooKeeperRegistrarService init = ZooKeeperRegistrarService.newBuilder() .setZooKeeperClient(zkClient) .setZooKeeperRegistrar(zooKeeperRegistrar) .build(); init.startUp(); assertNull(complete.get(3000, MILLISECONDS)); init.shutDown(); assertNull(shutdownComplete.get(3000, MILLISECONDS)); }
@Override protected void shutDown() throws Exception { reactor.stopAsync().awaitTerminated(); zooKeeperRegistrar.shutDown(); }
ZooKeeperRegistrarService extends AbstractIdleService { @Override protected void shutDown() throws Exception { reactor.stopAsync().awaitTerminated(); zooKeeperRegistrar.shutDown(); } }
ZooKeeperRegistrarService extends AbstractIdleService { @Override protected void shutDown() throws Exception { reactor.stopAsync().awaitTerminated(); zooKeeperRegistrar.shutDown(); } private  ZooKeeperRegistrarService(final Builder builder); }
ZooKeeperRegistrarService extends AbstractIdleService { @Override protected void shutDown() throws Exception { reactor.stopAsync().awaitTerminated(); zooKeeperRegistrar.shutDown(); } private  ZooKeeperRegistrarService(final Builder builder); static Builder newBuilder(); }
ZooKeeperRegistrarService extends AbstractIdleService { @Override protected void shutDown() throws Exception { reactor.stopAsync().awaitTerminated(); zooKeeperRegistrar.shutDown(); } private  ZooKeeperRegistrarService(final Builder builder); static Builder newBuilder();  }