org.apache.cassandra.config
Class ColumnDefinition
java.lang.Object
org.apache.cassandra.config.ColumnDefinition
public class ColumnDefinition
- extends java.lang.Object
Constructor Summary |
ColumnDefinition(java.nio.ByteBuffer name,
AbstractType<?> validator,
org.apache.cassandra.thrift.IndexType index_type,
java.util.Map<java.lang.String,java.lang.String> index_options,
java.lang.String index_name,
java.lang.Integer componentIndex)
|
Method Summary |
void |
apply(ColumnDefinition def,
AbstractType<?> comparator)
|
ColumnDefinition |
clone()
|
void |
deleteFromSchema(RowMutation rm,
java.lang.String cfName,
AbstractType<?> comparator,
long timestamp)
Drop specified column from the schema using given row. |
boolean |
equals(java.lang.Object o)
|
static java.util.List<ColumnDefinition> |
fromSchema(Row row,
CFMetaData cfm)
Deserialize columns from low-level representation |
static ColumnDefinition |
fromThrift(org.apache.cassandra.thrift.ColumnDef thriftColumnDef)
|
static java.util.Map<java.nio.ByteBuffer,ColumnDefinition> |
fromThrift(java.util.List<org.apache.cassandra.thrift.ColumnDef> thriftDefs)
|
java.lang.String |
getIndexName()
|
java.util.Map<java.lang.String,java.lang.String> |
getIndexOptions()
|
org.apache.cassandra.thrift.IndexType |
getIndexType()
|
static java.util.Map<java.lang.String,java.lang.String> |
getStringMap(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> charMap)
|
AbstractType<?> |
getValidator()
|
int |
hashCode()
|
static Row |
readSchema(java.lang.String ksName,
java.lang.String cfName)
|
void |
setIndexName(java.lang.String s)
|
void |
setIndexType(org.apache.cassandra.thrift.IndexType index_type,
java.util.Map<java.lang.String,java.lang.String> index_options)
|
void |
setValidator(AbstractType<?> validator)
|
void |
toSchema(RowMutation rm,
java.lang.String cfName,
AbstractType<?> comparator,
long timestamp)
|
java.lang.String |
toString()
|
org.apache.cassandra.thrift.ColumnDef |
toThrift()
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
name
public final java.nio.ByteBuffer name
componentIndex
public final java.lang.Integer componentIndex
ColumnDefinition
public ColumnDefinition(java.nio.ByteBuffer name,
AbstractType<?> validator,
org.apache.cassandra.thrift.IndexType index_type,
java.util.Map<java.lang.String,java.lang.String> index_options,
java.lang.String index_name,
java.lang.Integer componentIndex)
clone
public ColumnDefinition clone()
- Overrides:
clone
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toThrift
public org.apache.cassandra.thrift.ColumnDef toThrift()
fromThrift
public static ColumnDefinition fromThrift(org.apache.cassandra.thrift.ColumnDef thriftColumnDef)
throws SyntaxException,
ConfigurationException
- Throws:
SyntaxException
ConfigurationException
fromThrift
public static java.util.Map<java.nio.ByteBuffer,ColumnDefinition> fromThrift(java.util.List<org.apache.cassandra.thrift.ColumnDef> thriftDefs)
throws SyntaxException,
ConfigurationException
- Throws:
SyntaxException
ConfigurationException
deleteFromSchema
public void deleteFromSchema(RowMutation rm,
java.lang.String cfName,
AbstractType<?> comparator,
long timestamp)
- Drop specified column from the schema using given row.
- Parameters:
rm
- The schema row mutationcfName
- The name of the parent ColumnFamilytimestamp
- The timestamp to use for column modification
toSchema
public void toSchema(RowMutation rm,
java.lang.String cfName,
AbstractType<?> comparator,
long timestamp)
apply
public void apply(ColumnDefinition def,
AbstractType<?> comparator)
throws ConfigurationException
- Throws:
ConfigurationException
fromSchema
public static java.util.List<ColumnDefinition> fromSchema(Row row,
CFMetaData cfm)
- Deserialize columns from low-level representation
- Parameters:
row
-
- Returns:
- Thrift-based deserialized representation of the column
readSchema
public static Row readSchema(java.lang.String ksName,
java.lang.String cfName)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getIndexName
public java.lang.String getIndexName()
setIndexName
public void setIndexName(java.lang.String s)
setIndexType
public void setIndexType(org.apache.cassandra.thrift.IndexType index_type,
java.util.Map<java.lang.String,java.lang.String> index_options)
getIndexType
public org.apache.cassandra.thrift.IndexType getIndexType()
getIndexOptions
public java.util.Map<java.lang.String,java.lang.String> getIndexOptions()
getValidator
public AbstractType<?> getValidator()
setValidator
public void setValidator(AbstractType<?> validator)
getStringMap
public static java.util.Map<java.lang.String,java.lang.String> getStringMap(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> charMap)
Copyright © 2012 The Apache Software Foundation