/** * Downgrades the specified consistency level to be compatible with the Cassandra ring's actual topology. * Useful for writing code that runs against rings that vary between single-node testing servers and multi- * data center, highly replicated network topologies. */ public ConsistencyLevel clamp(ConsistencyLevel consistencyLevel) { return _topologyAdapter.clamp(consistencyLevel); }
public void start() throws Exception { // Astyanax _astyanaxKeyspace = _astyanaxCluster.connect(_keyspaceName); _replication = new CassandraReplication(_astyanaxKeyspace.describeKeyspace()); _topologyAdapter = new ConsistencyTopologyAdapter(_replication); // CQL driver _cqlSession = _cqlCluster.connect(_keyspaceName); errorIfPartitionerMisconfigured(); }
public void start() throws Exception { // Astyanax _astyanaxKeyspace = _astyanaxCluster.connect(_keyspaceName); _replication = new CassandraReplication(_astyanaxKeyspace.describeKeyspace()); _topologyAdapter = new ConsistencyTopologyAdapter(_replication); // CQL driver _cqlSession = _cqlCluster.connect(_keyspaceName); errorIfPartitionerMisconfigured(); }
/** * Downgrades the specified consistency level to be compatible with the Cassandra ring's actual topology. * Useful for writing code that runs against rings that vary between single-node testing servers and multi- * data center, highly replicated network topologies. */ public ConsistencyLevel clamp(ConsistencyLevel consistencyLevel) { return _topologyAdapter.clamp(consistencyLevel); }