me.prettyprint.cassandra.model
Class AllOneConsistencyLevelPolicy

java.lang.Object
  extended by me.prettyprint.cassandra.model.AllOneConsistencyLevelPolicy
All Implemented Interfaces:
ConsistencyLevelPolicy

public final class AllOneConsistencyLevelPolicy
extends Object
implements ConsistencyLevelPolicy

A simple implementation of ConsistencyLevelPolicy which returns ONE as the desired consistency level for both reads and writes.

Author:
Ran Tavory

Constructor Summary
AllOneConsistencyLevelPolicy()
           
 
Method Summary
 HConsistencyLevel get(OperationType op)
          Get the desired consistency level according to the operation type.
 HConsistencyLevel get(OperationType op, String cfName)
          Get desired consistency according to the operation type and column family name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllOneConsistencyLevelPolicy

public AllOneConsistencyLevelPolicy()
Method Detail

get

public HConsistencyLevel get(OperationType op)
Description copied from interface: ConsistencyLevelPolicy
Get the desired consistency level according to the operation type.

Specified by:
get in interface ConsistencyLevelPolicy
Returns:

get

public HConsistencyLevel get(OperationType op,
                             String cfName)
Description copied from interface: ConsistencyLevelPolicy
Get desired consistency according to the operation type and column family name.

Specified by:
get in interface ConsistencyLevelPolicy
Returns:


Copyright © 2011. All Rights Reserved.