pl.allegro.tech.hermes.test.helper.zookeeper.ZookeeperWaiter.untilZookeeperClientStarted()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(99)

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

ZookeeperWaiter.untilZookeeperClientStarted介绍

暂无

代码示例

代码示例来源:origin: allegro/hermes

public void untilZookeeperClientStarted() {
  this.untilZookeeperClientStarted(zookeeper);
}

代码示例来源:origin: pl.allegro.tech.hermes/hermes-test-helper

public void untilZookeeperClientStarted() {
  this.untilZookeeperClientStarted(zookeeper);
}

代码示例来源:origin: allegro/hermes

protected static CuratorFramework newClient() {
  CuratorFramework newClient = CuratorFrameworkFactory.builder()
      .connectString(zookeeperServer.getConnectString())
      .retryPolicy(new ExponentialBackoffRetry(1000, 3))
      .build();
  newClient.start();
  wait.untilZookeeperClientStarted(newClient);
  return newClient;
}

代码示例来源:origin: pl.allegro.tech.hermes/hermes-test-helper

protected static CuratorFramework newClient() {
  CuratorFramework newClient = CuratorFrameworkFactory.builder()
      .connectString(zookeeperServer.getConnectString())
      .retryPolicy(new ExponentialBackoffRetry(1000, 3))
      .build();
  newClient.start();
  wait.untilZookeeperClientStarted(newClient);
  return newClient;
}

代码示例来源:origin: allegro/hermes

@BeforeClass
public static void beforeZookeeperClass() throws Exception {
  zookeeperServer = new TestingServer(45678);
  zookeeperClient = CuratorFrameworkFactory.builder()
      .connectString(zookeeperServer.getConnectString())
      .retryPolicy(new ExponentialBackoffRetry(1000, 3))
      .build();
  zookeeperClient.start();
  wait = new ZookeeperWaiter(zookeeperClient);
  wait.untilZookeeperClientStarted();
  ZooKeeperClient zooKeeperClient = new ZooKeeperClient(
      zookeeperServer.getConnectString(), 60 * 1000, 15 * 1000,
      10, Time.SYSTEM, "zookeeper-test", "zookeeper-test");
  zooKeeperClient.waitUntilConnected();
  kafkaZkClient = new KafkaZkClient(zooKeeperClient, false, Time.SYSTEM);
}

代码示例来源:origin: pl.allegro.tech.hermes/hermes-test-helper

@BeforeClass
public static void beforeZookeeperClass() throws Exception {
  zookeeperServer = new TestingServer(45678);
  zookeeperClient = CuratorFrameworkFactory.builder()
      .connectString(zookeeperServer.getConnectString())
      .retryPolicy(new ExponentialBackoffRetry(1000, 3))
      .build();
  zookeeperClient.start();
  wait = new ZookeeperWaiter(zookeeperClient);
  wait.untilZookeeperClientStarted();
  ZooKeeperClient zooKeeperClient = new ZooKeeperClient(
      zookeeperServer.getConnectString(), 60 * 1000, 15 * 1000,
      10, Time.SYSTEM, "zookeeper-test", "zookeeper-test");
  zooKeeperClient.waitUntilConnected();
  kafkaZkClient = new KafkaZkClient(zooKeeperClient, false, Time.SYSTEM);
}

相关文章