use of com.linkedin.d2.balancer.servers.ZKUriStoreFactory in project rest.li by linkedin.
the class ExampleD2Server method createZkManager.
private static ZooKeeperConnectionManager createZkManager(JSONObject json, ZooKeeperAnnouncer[] zkAnnouncers) {
ZKUriStoreFactory factory = new ZKUriStoreFactory();
String zkConnectString = (String) json.get("zkConnectString");
int zkRetryLimit = ((Long) json.get("zkRetryLimit")).intValue();
int zkSessionTimeout = ((Long) json.get("zkSessionTimeout")).intValue();
String zkBasePath = (String) json.get("zkBasePath");
return new ZooKeeperConnectionManager(zkConnectString, zkSessionTimeout, zkBasePath, factory, zkRetryLimit, zkAnnouncers);
}
Aggregations