org.apache.cassandra.config
Class CFMetaData

java.lang.Object
  extended by org.apache.cassandra.config.CFMetaData

public final class CFMetaData
extends java.lang.Object


Field Summary
 java.lang.Integer cfId
           
 java.lang.String cfName
           
 ColumnFamilyType cfType
           
 ClockType clockType
           
 java.util.Map<byte[],ColumnDefinition> column_metadata
           
 java.lang.String comment
           
 AbstractType comparator
           
static int DEFAULT_GC_GRACE_SECONDS
           
static double DEFAULT_KEY_CACHE_SIZE
           
static int DEFAULT_MAX_COMPACTION_THRESHOLD
           
static int DEFAULT_MIN_COMPACTION_THRESHOLD
           
static boolean DEFAULT_PRELOAD_ROW_CACHE
           
static double DEFAULT_READ_REPAIR_CHANCE
           
static double DEFAULT_ROW_CACHE_SIZE
           
 AbstractType defaultValidator
           
 int gcGraceSeconds
           
static CFMetaData HintsCf
           
static CFMetaData IndexCf
           
 double keyCacheSize
           
 java.lang.Integer maxCompactionThreshold
           
static CFMetaData MigrationsCf
           
 java.lang.Integer minCompactionThreshold
           
 boolean preloadRowCache
           
 double readRepairChance
           
 AbstractReconciler reconciler
           
 double rowCacheSize
           
static CFMetaData SchemaCf
           
static CFMetaData StatusCf
           
 AbstractType subcolumnComparator
           
 java.lang.String tableName
           
 
Constructor Summary
CFMetaData(java.lang.String tableName, java.lang.String cfName, ColumnFamilyType cfType, ClockType clockType, AbstractType comparator, AbstractType subcolumnComparator, AbstractReconciler reconciler, java.lang.String comment, double rowCacheSize, boolean preloadRowCache, double keyCacheSize, double readRepairChance, int gcGraceSeconds, AbstractType defaultValidator, int minCompactionThreshold, int maxCompactionThreshold, java.util.Map<byte[],ColumnDefinition> column_metadata)
           
 
Method Summary
 CFMetaData apply(org.apache.cassandra.avro.CfDef cf_def)
           
 CFMetaData apply(CfDef cf_def)
           
static org.apache.cassandra.avro.CfDef convertToAvro(CFMetaData cfm)
           
static CfDef convertToThrift(CFMetaData cfm)
           
 org.apache.cassandra.config.avro.CfDef deflate()
           
 boolean equals(java.lang.Object obj)
           
static void fixMaxId()
           
static Pair<java.lang.String,java.lang.String> getCF(java.lang.Integer cfId)
           
static java.util.Map<Pair<java.lang.String,java.lang.String>,java.lang.Integer> getCfToIdMap()
           
static java.lang.Integer getId(java.lang.String table, java.lang.String cfName)
           
 AbstractType getValueValidator(byte[] column)
           
 int hashCode()
           
static CFMetaData inflate(org.apache.cassandra.config.avro.CfDef cf)
           
static void map(CFMetaData cfm)
          adds this cfm to the map.
static CFMetaData newIndexMetadata(java.lang.String table, java.lang.String parentCf, ColumnDefinition info, AbstractType columnComparator)
           
 java.lang.String pretty()
           
static void purge(CFMetaData cfm)
          used for evicting cf data out of static tracking collections.
static CFMetaData rename(CFMetaData cfm, java.lang.String newName)
          clones an existing CFMetaData using the same id.
static CFMetaData renameTable(CFMetaData cfm, java.lang.String tableName)
          clones existing CFMetaData.
static void validateMinMaxCompactionThresholds(CfDef cf_def)
           
static void validateMinMaxCompactionThresholds(org.apache.cassandra.avro.CfDef cf_def)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ROW_CACHE_SIZE

public static final double DEFAULT_ROW_CACHE_SIZE
See Also:
Constant Field Values

DEFAULT_KEY_CACHE_SIZE

public static final double DEFAULT_KEY_CACHE_SIZE
See Also:
Constant Field Values

DEFAULT_READ_REPAIR_CHANCE

public static final double DEFAULT_READ_REPAIR_CHANCE
See Also:
Constant Field Values

DEFAULT_PRELOAD_ROW_CACHE

public static final boolean DEFAULT_PRELOAD_ROW_CACHE
See Also:
Constant Field Values

DEFAULT_GC_GRACE_SECONDS

public static final int DEFAULT_GC_GRACE_SECONDS
See Also:
Constant Field Values

DEFAULT_MIN_COMPACTION_THRESHOLD

public static final int DEFAULT_MIN_COMPACTION_THRESHOLD
See Also:
Constant Field Values

DEFAULT_MAX_COMPACTION_THRESHOLD

public static final int DEFAULT_MAX_COMPACTION_THRESHOLD
See Also:
Constant Field Values

StatusCf

public static final CFMetaData StatusCf

HintsCf

public static final CFMetaData HintsCf

MigrationsCf

public static final CFMetaData MigrationsCf

SchemaCf

public static final CFMetaData SchemaCf

IndexCf

public static final CFMetaData IndexCf

cfId

public final java.lang.Integer cfId

tableName

public final java.lang.String tableName

cfName

public final java.lang.String cfName

cfType

public final ColumnFamilyType cfType

clockType

public final ClockType clockType

comparator

public final AbstractType comparator

subcolumnComparator

public final AbstractType subcolumnComparator

reconciler

public final AbstractReconciler reconciler

comment

public final java.lang.String comment

rowCacheSize

public final double rowCacheSize

keyCacheSize

public final double keyCacheSize

readRepairChance

public final double readRepairChance

preloadRowCache

public final boolean preloadRowCache

gcGraceSeconds

public final int gcGraceSeconds

defaultValidator

public final AbstractType defaultValidator

minCompactionThreshold

public final java.lang.Integer minCompactionThreshold

maxCompactionThreshold

public final java.lang.Integer maxCompactionThreshold

column_metadata

public final java.util.Map<byte[],ColumnDefinition> column_metadata
Constructor Detail

CFMetaData

public CFMetaData(java.lang.String tableName,
                  java.lang.String cfName,
                  ColumnFamilyType cfType,
                  ClockType clockType,
                  AbstractType comparator,
                  AbstractType subcolumnComparator,
                  AbstractReconciler reconciler,
                  java.lang.String comment,
                  double rowCacheSize,
                  boolean preloadRowCache,
                  double keyCacheSize,
                  double readRepairChance,
                  int gcGraceSeconds,
                  AbstractType defaultValidator,
                  int minCompactionThreshold,
                  int maxCompactionThreshold,
                  java.util.Map<byte[],ColumnDefinition> column_metadata)
Method Detail

getCfToIdMap

public static final java.util.Map<Pair<java.lang.String,java.lang.String>,java.lang.Integer> getCfToIdMap()
Returns:
An immutable mapping of (ksname,cfname) to id.

getCF

public static final Pair<java.lang.String,java.lang.String> getCF(java.lang.Integer cfId)
Returns:
The (ksname,cfname) pair for the given id, or null if it has been dropped.

getId

public static final java.lang.Integer getId(java.lang.String table,
                                            java.lang.String cfName)
Returns:
The id for the given (ksname,cfname) pair, or null if it has been dropped.

fixMaxId

public static final void fixMaxId()

map

public static void map(CFMetaData cfm)
                throws ConfigurationException
adds this cfm to the map.

Throws:
ConfigurationException

newIndexMetadata

public static CFMetaData newIndexMetadata(java.lang.String table,
                                          java.lang.String parentCf,
                                          ColumnDefinition info,
                                          AbstractType columnComparator)

rename

public static CFMetaData rename(CFMetaData cfm,
                                java.lang.String newName)
clones an existing CFMetaData using the same id.


renameTable

public static CFMetaData renameTable(CFMetaData cfm,
                                     java.lang.String tableName)
clones existing CFMetaData. keeps the id but changes the table name.


purge

public static void purge(CFMetaData cfm)
used for evicting cf data out of static tracking collections.


pretty

public java.lang.String pretty()

deflate

public org.apache.cassandra.config.avro.CfDef deflate()

inflate

public static CFMetaData inflate(org.apache.cassandra.config.avro.CfDef cf)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getValueValidator

public AbstractType getValueValidator(byte[] column)

apply

public CFMetaData apply(org.apache.cassandra.avro.CfDef cf_def)
                 throws ConfigurationException
Throws:
ConfigurationException

apply

public CFMetaData apply(CfDef cf_def)
                 throws ConfigurationException
Throws:
ConfigurationException

convertToThrift

public static CfDef convertToThrift(CFMetaData cfm)

convertToAvro

public static org.apache.cassandra.avro.CfDef convertToAvro(CFMetaData cfm)

validateMinMaxCompactionThresholds

public static void validateMinMaxCompactionThresholds(CfDef cf_def)
                                               throws ConfigurationException
Throws:
ConfigurationException

validateMinMaxCompactionThresholds

public static void validateMinMaxCompactionThresholds(org.apache.cassandra.avro.CfDef cf_def)
                                               throws ConfigurationException
Throws:
ConfigurationException


Copyright © 2010 The Apache Software Foundation