Package com.netflix.curator.retry

Examples of com.netflix.curator.retry.RetryNTimes


  public CuratorZookeeperClient(URL url) {
    super(url);
    try {
      Builder builder = CuratorFrameworkFactory.builder()
          .connectString(url.getBackupAddress())
              .retryPolicy(new RetryNTimes(Integer.MAX_VALUE, 1000)) 
              .connectionTimeoutMs(5000);
      String authority = url.getAuthority();
      if (authority != null && authority.length() > 0) {
        builder = builder.authorization("digest", authority.getBytes());
      }
View Full Code Here


        startZooKeeper();
    }

    @SuppressWarnings("UnusedDeclaration")
    public CuratorFramework newCurator() throws Exception {
        return newCurator(CuratorFrameworkFactory.builder().retryPolicy(new RetryNTimes(0, 0)));
    }
View Full Code Here

  public CuratorZookeeperClient(URL url) {
    super(url);
    try {
      Builder builder = CuratorFrameworkFactory.builder()
          .connectString(url.getBackupAddress())
              .retryPolicy(new RetryNTimes(Integer.MAX_VALUE, 1000)) 
              .connectionTimeoutMs(5000);
      String authority = url.getAuthority();
      if (authority != null && authority.length() > 0) {
        builder = builder.authorization("digest", authority.getBytes());
      }
View Full Code Here

        String serverPorts = "";
        List<Host> zkServers = config.zkServers;
        for (Host server : zkServers) {
            serverPorts = serverPorts + server.getHost() + ":" + server.getPort() + ",";
        }
        return CuratorFrameworkFactory.newClient(serverPorts, Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)), 15000, new RetryNTimes(
                Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_TIMES)), Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL))));
    }
View Full Code Here

TOP

Related Classes of com.netflix.curator.retry.RetryNTimes

Copyright © 2018 www.massapicom. 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.