Package com.datastax.driver.core.policies

Examples of com.datastax.driver.core.policies.LoggingRetryPolicy


        int port = storageNodes.get(0).getCqlPort();

        cluster = new ClusterBuilder().addContactPoints(hostNames.toArray(new String[hostNames.size()]))
            .withCredentialsObfuscated(this.cachedStorageUsername, this.cachedStoragePassword).withPort(port)
            .withLoadBalancingPolicy(getLoadBalancingPolicy())
            .withRetryPolicy(new LoggingRetryPolicy(DefaultRetryPolicy.INSTANCE)).withCompression(
                ProtocolOptions.Compression.NONE).build();

        driverMetrics = cluster.getMetrics();

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


        cassandra = new EmbeddedCassandraService();
        cassandra.start();

        cluster = Cluster.builder().addContactPoint("127.0.0.1")
                         .withRetryPolicy(new LoggingRetryPolicy(Policies.defaultRetryPolicy()))
                         .withPort(DatabaseDescriptor.getNativeTransportPort()).build();
        session = cluster.connect();

        session.execute("CREATE KEYSPACE IF NOT EXISTS " + KEYSPACE +" WITH replication " +
                        "= {'class':'SimpleStrategy', 'replication_factor':1};");
View Full Code Here

      Cluster cluster = Cluster.builder()
          .addContactPoints(DatabaseDescriptor.getListenAddress())
          .withPort(DatabaseDescriptor.getNativeTransportPort())
          .withSocketOptions(socketOptions)
          // Let's at least log all of the retries so we can see what is happening.
          .withRetryPolicy(new LoggingRetryPolicy(Policies.defaultRetryPolicy()))
          // The default reconnection policy (exponential) looks fine.
          .build();
      mCassandraSession = cluster.connect();
    } catch (Exception exc) {
      throw new KijiIOException(
View Full Code Here

            break;
        }

        if (retryPolicy != null && Boolean.valueOf(isLoggingRetry))
        {
            retryPolicy = new LoggingRetryPolicy(retryPolicy);
        }

        return retryPolicy;

    }
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.policies.LoggingRetryPolicy

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.