gpt4 book ai didi

com.spotify.helios.servicescommon.coordination.ZooKeeperClient.close()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 04:09:31 28 4
gpt4 key购买 nike

本文整理了Java中com.spotify.helios.servicescommon.coordination.ZooKeeperClient.close()方法的一些代码示例,展示了ZooKeeperClient.close()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperClient.close()方法的具体详情如下:
包路径:com.spotify.helios.servicescommon.coordination.ZooKeeperClient
类名称:ZooKeeperClient
方法名:close

ZooKeeperClient.close介绍

暂无

代码示例

代码示例来源:origin: spotify/helios

@Override
public void close() {
 client.close();
}

代码示例来源:origin: spotify/helios

@Override
protected void shutDown() throws Exception {
 server.stop();
 server.join();
 registrar.close();
 agentReaper.ifPresent(reaper -> reaper.stopAsync().awaitTerminated());
 oldJobReaper.ifPresent(reaper -> reaper.stopAsync().awaitTerminated());
 jobHistoryReaper.ifPresent(reaper -> reaper.stopAsync().awaitTerminated());
 rollingUpdateService.stopAsync().awaitTerminated();
 expiredJobReaper.stopAsync().awaitTerminated();
 zkRegistrar.stopAsync().awaitTerminated();
 zooKeeperClient.close();
}

代码示例来源:origin: spotify/helios

static void initializeAcl(final String zooKeeperConnectionString,
             final String zooKeeperClusterId,
             final String masterUser,
             final String masterPassword,
             final String agentUser,
             final String agentPassword)
  throws KeeperException {
 final ACLProvider aclProvider = heliosAclProvider(
   masterUser, digest(masterUser, masterPassword),
   agentUser, digest(agentUser, agentPassword));
 final List<AuthInfo> authorization = Lists.newArrayList(new AuthInfo(
   "digest", String.format("%s:%s", masterUser, masterPassword).getBytes()));
 final RetryPolicy zooKeeperRetryPolicy = new ExponentialBackoffRetry(1000, 3);
 final CuratorFramework curator = new CuratorClientFactoryImpl().newClient(
   zooKeeperConnectionString,
   (int) TimeUnit.SECONDS.toMillis(60),
   (int) TimeUnit.SECONDS.toMillis(15),
   zooKeeperRetryPolicy,
   aclProvider,
   authorization);
 final ZooKeeperClient client = new DefaultZooKeeperClient(curator, zooKeeperClusterId);
 try {
  client.start();
  initializeAclRecursive(client, "/", aclProvider);
 } finally {
  client.close();
 }
}

代码示例来源:origin: spotify/helios

@Override
protected void shutDown() throws Exception {
 if (server != null) {
  server.stop();
 }
 hostInfoReporter.stopAsync().awaitTerminated();
 agentInfoReporter.stopAsync().awaitTerminated();
 environmentVariableReporter.stopAsync().awaitTerminated();
 labelReporter.stopAsync().awaitTerminated();
 agent.stopAsync().awaitTerminated();
 if (serviceRegistrar != null) {
  serviceRegistrar.close();
 }
 zkRegistrar.stopAsync().awaitTerminated();
 model.stopAsync().awaitTerminated();
 metrics.stop();
 zooKeeperClient.close();
 try {
  stateLock.release();
 } catch (IOException e) {
  log.error("Failed to release state lock", e);
 }
 try {
  stateLockFile.close();
 } catch (IOException e) {
  log.error("Failed to close state lock file", e);
 }
}

代码示例来源:origin: at.molindo/helios-services

@Override
public void close() {
 client.close();
}

代码示例来源:origin: at.molindo/helios-services

@Override
protected void shutDown() throws Exception {
 server.stop();
 server.join();
 registrar.close();
 rollingUpdateService.stopAsync().awaitTerminated();
 expiredJobReaper.stopAsync().awaitTerminated();
 zkRegistrar.stopAsync().awaitTerminated();
 zooKeeperClient.close();
}

代码示例来源:origin: at.molindo/helios-services

@Override
protected void shutDown() throws Exception {
 if (server != null) {
  server.stop();
 }
 hostInfoReporter.stopAsync().awaitTerminated();
 agentInfoReporter.stopAsync().awaitTerminated();
 environmentVariableReporter.stopAsync().awaitTerminated();
 labelReporter.stopAsync().awaitTerminated();
 agent.stopAsync().awaitTerminated();
 if (serviceRegistrar != null) {
  serviceRegistrar.close();
 }
 zkRegistrar.stopAsync().awaitTerminated();
 model.stopAsync().awaitTerminated();
 metrics.stop();
 zooKeeperClient.close();
 try {
  stateLock.release();
 } catch (IOException e) {
  log.error("Failed to release state lock", e);
 }
 try {
  stateLockFile.close();
 } catch (IOException e) {
  log.error("Failed to close state lock file", e);
 }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com