Package com.netflix.curator.framework.CuratorFrameworkFactory

Examples of com.netflix.curator.framework.CuratorFrameworkFactory.Builder.build()


    RetryPolicy retryPolicy = new RetryOneTime((int) retryInterval.getTotalMilliseconds());
    builder.retryPolicy(retryPolicy);

    CuratorFramework curatorFramework;
    try {
      curatorFramework = builder.build();
    } catch (IOException e) {
      throw new OpsException("Error building zookeeper connection", e);
    }

    return curatorFramework;
View Full Code Here


              .connectionTimeoutMs(5000);
      String authority = url.getAuthority();
      if (authority != null && authority.length() > 0) {
        builder = builder.authorization("digest", authority.getBytes());
      }
      client = builder.build();
      client.getConnectionStateListenable().addListener(new ConnectionStateListener() {
        public void stateChanged(CuratorFramework client, ConnectionState state) {
          if (state == ConnectionState.LOST) {
            CuratorZookeeperClient.this.stateChanged(StateListener.DISCONNECTED);
          } else if (state == ConnectionState.CONNECTED) {
View Full Code Here

              .connectionTimeoutMs(5000);
      String authority = url.getAuthority();
      if (authority != null && authority.length() > 0) {
        builder = builder.authorization("digest", authority.getBytes());
      }
      client = builder.build();
      client.getConnectionStateListenable().addListener(new ConnectionStateListener() {
        public void stateChanged(CuratorFramework client, ConnectionState state) {
          if (state == ConnectionState.LOST) {
            CuratorZookeeperClient.this.stateChanged(StateListener.DISCONNECTED);
          } else if (state == ConnectionState.CONNECTED) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.