org.apache.cassandra.transport
Enum DataType

java.lang.Object
  extended by java.lang.Enum<DataType>
      extended by org.apache.cassandra.transport.DataType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DataType>, OptionCodec.Codecable<DataType>

public enum DataType
extends java.lang.Enum<DataType>
implements OptionCodec.Codecable<DataType>


Enum Constant Summary
ASCII
           
BIGINT
           
BLOB
           
BOOLEAN
           
COUNTER
           
CUSTOM
           
DECIMAL
           
DOUBLE
           
FLOAT
           
INET
           
INT
           
LIST
           
MAP
           
SET
           
TEXT
           
TIMESTAMP
           
TIMEUUID
           
UUID
           
VARCHAR
           
VARINT
           
 
Field Summary
static OptionCodec<DataType> codec
           
 
Method Summary
static Pair<DataType,java.lang.Object> fromType(AbstractType type)
           
 int getId()
           
 java.lang.Object readValue(org.jboss.netty.buffer.ChannelBuffer cb)
           
 int serializedValueSize(java.lang.Object value)
           
static AbstractType toType(Pair<DataType,java.lang.Object> entry)
           
static DataType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DataType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 void writeValue(java.lang.Object value, org.jboss.netty.buffer.ChannelBuffer cb)
           
 
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

CUSTOM

public static final DataType CUSTOM

ASCII

public static final DataType ASCII

BIGINT

public static final DataType BIGINT

BLOB

public static final DataType BLOB

BOOLEAN

public static final DataType BOOLEAN

COUNTER

public static final DataType COUNTER

DECIMAL

public static final DataType DECIMAL

DOUBLE

public static final DataType DOUBLE

FLOAT

public static final DataType FLOAT

INT

public static final DataType INT

TEXT

public static final DataType TEXT

TIMESTAMP

public static final DataType TIMESTAMP

UUID

public static final DataType UUID

VARCHAR

public static final DataType VARCHAR

VARINT

public static final DataType VARINT

TIMEUUID

public static final DataType TIMEUUID

INET

public static final DataType INET

LIST

public static final DataType LIST

MAP

public static final DataType MAP

SET

public static final DataType SET
Field Detail

codec

public static final OptionCodec<DataType> codec
Method Detail

values

public static DataType[] 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 (DataType c : DataType.values())
    System.out.println(c);

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

valueOf

public static DataType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getId

public int getId()
Specified by:
getId in interface OptionCodec.Codecable<DataType>

readValue

public java.lang.Object readValue(org.jboss.netty.buffer.ChannelBuffer cb)
Specified by:
readValue in interface OptionCodec.Codecable<DataType>

writeValue

public void writeValue(java.lang.Object value,
                       org.jboss.netty.buffer.ChannelBuffer cb)
Specified by:
writeValue in interface OptionCodec.Codecable<DataType>

serializedValueSize

public int serializedValueSize(java.lang.Object value)
Specified by:
serializedValueSize in interface OptionCodec.Codecable<DataType>

fromType

public static Pair<DataType,java.lang.Object> fromType(AbstractType type)

toType

public static AbstractType toType(Pair<DataType,java.lang.Object> entry)


Copyright © 2012 The Apache Software Foundation