Search in sources :

Example 1 with ZKUriStoreFactory

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);
}
Also used : ZKUriStoreFactory(com.linkedin.d2.balancer.servers.ZKUriStoreFactory) ZooKeeperConnectionManager(com.linkedin.d2.balancer.servers.ZooKeeperConnectionManager)

Aggregations

ZKUriStoreFactory (com.linkedin.d2.balancer.servers.ZKUriStoreFactory)1 ZooKeeperConnectionManager (com.linkedin.d2.balancer.servers.ZooKeeperConnectionManager)1