Package com.netflix.curator.retry

Examples of com.netflix.curator.retry.RetryOneTime


    String connectionString = Joiner.on(",").join(dnsNames);

    Builder builder = CuratorFrameworkFactory.builder();
    builder.connectString(connectionString);
    TimeSpan retryInterval = TimeSpan.FIVE_SECONDS;
    RetryPolicy retryPolicy = new RetryOneTime((int) retryInterval.getTotalMilliseconds());
    builder.retryPolicy(retryPolicy);

    CuratorFramework curatorFramework;
    try {
      curatorFramework = builder.build();
View Full Code Here


        return PORT;
    }

    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);
        }
View Full Code Here

    public SignalClient(String zkConnectString, String name) {
        this.name = name;
        try {
            this.client = CuratorFrameworkFactory.builder().namespace("storm-signals").connectString(zkConnectString)
                    .retryPolicy(new RetryOneTime(500)).build();
        } catch (IOException e) {
            LOG.error("Error creating zookeeper client.", e);
        }
        LOG.debug("created Curator client");
    }
View Full Code Here

    public static final String UID_PATH_SUFFIX = "-uid";
    private final CuratorFramework client;
    private final RetryPolicy retryPolicy;

    public ZooUidProvider(CuratorFramework client) {
        this(client, new RetryOneTime(1));
    }
View Full Code Here

TOP

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

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.