com.datastax.driver.core
Enum BatchStatement.Type

java.lang.Object
  extended by java.lang.Enum<BatchStatement.Type>
      extended by com.datastax.driver.core.BatchStatement.Type
All Implemented Interfaces:
Serializable, Comparable<BatchStatement.Type>
Enclosing class:
BatchStatement

public static enum BatchStatement.Type
extends Enum<BatchStatement.Type>

The type of batch to use.


Enum Constant Summary
COUNTER
          A counter batch.
LOGGED
          A logged batch: Cassandra will first the batch to its distributed batch log to ensure the atomicity of the batch.
UNLOGGED
          A batch that doesn't use Cassandra's distributed batch log.
 
Method Summary
static BatchStatement.Type valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BatchStatement.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LOGGED

public static final BatchStatement.Type LOGGED
A logged batch: Cassandra will first the batch to its distributed batch log to ensure the atomicity of the batch.


UNLOGGED

public static final BatchStatement.Type UNLOGGED
A batch that doesn't use Cassandra's distributed batch log. Such batch are not guaranteed to be atomic.


COUNTER

public static final BatchStatement.Type COUNTER
A counter batch. Note that such batch is the only type that can contain counter operation and it can only contain these.

Method Detail

values

public static BatchStatement.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (BatchStatement.Type c : BatchStatement.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static BatchStatement.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2013. All rights reserved.