Search in sources :

Example 1 with CuratorZKClientBridge

use of com.netflix.curator.x.zkclientbridge.CuratorZKClientBridge in project curator by Netflix.

the class ZkTestSystem method createZkConnection.

public static IZkConnection createZkConnection(String connectString) {
    Timing timing = new Timing();
    CuratorFramework client = CuratorFrameworkFactory.newClient(connectString, timing.session(), timing.connection(), new RetryOneTime(1));
    client.start();
    try {
        return new CuratorZKClientBridge(client);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : CuratorFramework(org.apache.curator.framework.CuratorFramework) RetryOneTime(org.apache.curator.retry.RetryOneTime) CuratorZKClientBridge(com.netflix.curator.x.zkclientbridge.CuratorZKClientBridge) Timing(org.apache.curator.test.Timing) IOException(java.io.IOException)

Aggregations

CuratorZKClientBridge (com.netflix.curator.x.zkclientbridge.CuratorZKClientBridge)1 IOException (java.io.IOException)1 CuratorFramework (org.apache.curator.framework.CuratorFramework)1 RetryOneTime (org.apache.curator.retry.RetryOneTime)1 Timing (org.apache.curator.test.Timing)1