Examples of ConfigurableConsistencyLevel


Examples of me.prettyprint.cassandra.model.ConfigurableConsistencyLevel

            cassandraHostConfigurator.setRetryDownedHostsDelayInSeconds(getIntValueOrExit(cmd, "retry-delay"));
        }
        if (cmd.hasOption("skip-retry-delay")) {         
            cassandraHostConfigurator.setRetryDownedHosts(false);
        }
        ConfigurableConsistencyLevel clc = null;
        if ( cmd.hasOption("consistency-levels")) {
            String[] levels = cmd.getOptionValues("consistency-levels")[0].split(":");
            clc = new ConfigurableConsistencyLevel();                       
            try {
              clc.setDefaultReadConsistencyLevel(HConsistencyLevel.valueOf(levels[0]));
              clc.setDefaultWriteConsistencyLevel(HConsistencyLevel.valueOf(levels[1]));
            } catch (Exception e) {
              throw new IllegalArgumentException("ConsistencyLevels must be specified by their full names. Ie. ONE,QUORUM. " + levels[0]);
            }
        }
       
View Full Code Here

Examples of me.prettyprint.cassandra.model.ConfigurableConsistencyLevel

    this.keySerializer = keySerializer;
    this.columnNameSerializer = columnNameSerializer;
    this.activeSlicePredicate = new HSlicePredicate<N>(columnNameSerializer);
    this.columnParent = new ColumnParent(columnFamilyName);
    exceptionsTranslator = new ExceptionsTranslatorImpl();
    this.consistencyLevelPolicy = new ConfigurableConsistencyLevel();
  }
View Full Code Here

Examples of me.prettyprint.cassandra.model.ConfigurableConsistencyLevel

        configurator.setMaxActive(builder.getMaxActive());
        cluster = HFactory.getOrCreateCluster(builder.getCluster(), configurator);

        final String keyspaceName = builder.getKeyspace();

        final ConfigurableConsistencyLevel consistencyLevelPolicy = new ConfigurableConsistencyLevel();
        consistencyLevelPolicy.setDefaultReadConsistencyLevel(builder.getReadConsistencyLevel());
        consistencyLevelPolicy.setDefaultWriteConsistencyLevel(builder.getWriteConsistencyLevel());
        keyspace = HFactory.createKeyspace(keyspaceName, cluster, consistencyLevelPolicy);

        final ColumnFamilyDefinition gauges = HFactory.createColumnFamilyDefinition(keyspaceName, builder.getGaugeValuesColumnFamily(), ComparatorType.LONGTYPE);
        final ColumnFamilyDefinition markersGauges = HFactory.createColumnFamilyDefinition(keyspaceName, builder.getMarkerGaugesColumFamily(), ComparatorType.UTF8TYPE);
        final ColumnFamilyDefinition counters = HFactory.createColumnFamilyDefinition(keyspaceName, builder.getCounterColumnFamily(), ComparatorType.UTF8TYPE);
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.