Package com.datastax.driver.core.policies

Examples of com.datastax.driver.core.policies.ReconnectionPolicy$ReconnectionSchedule


        QueryPlanCountingPolicy loadBalancingPolicy = new QueryPlanCountingPolicy(Policies.defaultLoadBalancingPolicy());
        AtomicInteger reconnectionAttempts = loadBalancingPolicy.counter;

        // Custom reconnection policy with a very large delay (longer than the test duration), to make sure we count
        // only the first reconnection attempt of each reconnection handler.
        ReconnectionPolicy reconnectionPolicy = new ReconnectionPolicy() {
            @Override
            public ReconnectionSchedule newSchedule() {
                return new ReconnectionSchedule() {
                    @Override
                    public long nextDelayMs() {
View Full Code Here


        json.putObject("policies", policiesJson);

        if (policies != null) {
            LoadBalancingPolicy lbPolicy = policies.getLoadBalancingPolicy();
            policiesJson.putString("load_balancing", lbPolicy == null ? null : lbPolicy.getClass().getSimpleName());
            ReconnectionPolicy reconnectionPolicy = policies.getReconnectionPolicy();
            policiesJson.putString("reconnection", reconnectionPolicy == null ? null : reconnectionPolicy.getClass().getSimpleName());
            RetryPolicy retryPolicy = policies.getRetryPolicy();
            policiesJson.putString("retry", retryPolicy == null ? null : retryPolicy.getClass().getSimpleName());
        }

        PoolingOptions poolingOptions = configuration.getPoolingOptions();
View Full Code Here

        json.putObject("policies", policiesJson);

        if (policies != null) {
            LoadBalancingPolicy lbPolicy = policies.getLoadBalancingPolicy();
            policiesJson.putString("load_balancing", lbPolicy == null ? null : lbPolicy.getClass().getSimpleName());
            ReconnectionPolicy reconnectionPolicy = policies.getReconnectionPolicy();
            policiesJson.putString("reconnection", reconnectionPolicy == null ? null : reconnectionPolicy.getClass().getSimpleName());
            RetryPolicy retryPolicy = policies.getRetryPolicy();
            policiesJson.putString("retry", retryPolicy == null ? null : retryPolicy.getClass().getSimpleName());
        }

        PoolingOptions poolingOptions = configuration.getPoolingOptions();
View Full Code Here

        json.putObject("policies", policiesJson);

        if (policies != null) {
            LoadBalancingPolicy lbPolicy = policies.getLoadBalancingPolicy();
            policiesJson.putString("load_balancing", lbPolicy == null ? null : lbPolicy.getClass().getSimpleName());
            ReconnectionPolicy reconnectionPolicy = policies.getReconnectionPolicy();
            policiesJson.putString("reconnection", reconnectionPolicy == null ? null : reconnectionPolicy.getClass().getSimpleName());
            RetryPolicy retryPolicy = policies.getRetryPolicy();
            policiesJson.putString("retry", retryPolicy == null ? null : retryPolicy.getClass().getSimpleName());
        }

        PoolingOptions poolingOptions = configuration.getPoolingOptions();
View Full Code Here

        json.putObject("policies", policiesJson);

        if (policies != null) {
            LoadBalancingPolicy lbPolicy = policies.getLoadBalancingPolicy();
            policiesJson.putString("load_balancing", lbPolicy == null ? null : lbPolicy.getClass().getSimpleName());
            ReconnectionPolicy reconnectionPolicy = policies.getReconnectionPolicy();
            policiesJson.putString("reconnection", reconnectionPolicy == null ? null : reconnectionPolicy.getClass().getSimpleName());
            RetryPolicy retryPolicy = policies.getRetryPolicy();
            policiesJson.putString("retry", retryPolicy == null ? null : retryPolicy.getClass().getSimpleName());
        }

        PoolingOptions poolingOptions = configuration.getPoolingOptions();
View Full Code Here

        }
        String clusterName = parameters.getTyped(CLUSTER_NAME);
        Compression compression = parameters.getTyped(COMPRESSION_TYPE);
        LoadBalancingPolicy loadBalancingPolicy = parameters.getTyped(LOAD_BALANCING_POLICY);
        RetryPolicy retryPolicy = parameters.getTyped(RETRY_POLICY);
        ReconnectionPolicy reconnectionPolicy = parameters.getTyped(RECONNECTION_POLICY);

        synchronized (this) {
            if (singletonCluster == null) {
                singletonCluster = Cluster.builder().addContactPoint(host).withPort(cqlPort).withClusterName(clusterName)
                        .withCompression(compression).withLoadBalancingPolicy(loadBalancingPolicy).withRetryPolicy(retryPolicy)
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.policies.ReconnectionPolicy$ReconnectionSchedule

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.