use of rpc.turbo.zk.common.ForeverRetryPolicy in project turbo-rpc by hank-whu.
the class ZooKeeperRegister method init.
@Override
public void init(List<HostPort> hostPorts) {
watcherMap = new ConcurrentHashMap<>();
String connectString = hostPorts.stream().map(i -> i.toString()).collect(Collectors.joining(","));
RetryPolicy retryPolicy = new ForeverRetryPolicy(1000, 60 * 1000);
client = CuratorFrameworkFactory.newClient(connectString, 1000 * 10, 1000 * 3, retryPolicy);
client.start();
}
use of rpc.turbo.zk.common.ForeverRetryPolicy in project turbo-rpc by hank-whu.
the class ZooKeeperDiscover method init.
@Override
public void init(List<HostPort> hostPorts) {
watchers = new ConcurrentArrayList<>();
String connectString = hostPorts.stream().map(i -> i.toString()).collect(Collectors.joining(","));
RetryPolicy retryPolicy = new ForeverRetryPolicy(1000, 60 * 1000);
client = CuratorFrameworkFactory.newClient(connectString, 1000 * 10, 1000 * 3, retryPolicy);
client.start();
}
Aggregations