Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.config
Class CFMetaData

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

    public final class CFMetaData

extends java.lang.Object

Nested Class Summary
`static class` | `CFMetaData.Caching`

Field Summary
`java.lang.Integer` | `cfId`
`java.lang.String` | `cfName`
`ColumnFamilyType` | `cfType`
`java.lang.Class<? extends AbstractCompactionStrategy>` | `compactionStrategyClass`
`java.util.Map<java.lang.String,java.lang.String>` | `compactionStrategyOptions`
`AbstractType<?>` | `comparator`
`CompressionParameters` | `compressionParameters`
`static java.lang.Double` | `DEFAULT_BF_FP_CHANCE`
`static CFMetaData.Caching` | `DEFAULT_CACHING_STRATEGY`
`static java.lang.String` | `DEFAULT_COMPACTION_STRATEGY_CLASS`
`static java.lang.String` | `DEFAULT_COMPRESSOR`
`static double` | `DEFAULT_DCLOCAL_READ_REPAIR_CHANCE`
`static int` | `DEFAULT_GC_GRACE_SECONDS`
`static java.nio.ByteBuffer` | `DEFAULT_KEY_NAME`
`static int` | `DEFAULT_MAX_COMPACTION_THRESHOLD`
`static int` | `DEFAULT_MIN_COMPACTION_THRESHOLD`
`static double` | `DEFAULT_READ_REPAIR_CHANCE`
`static boolean` | `DEFAULT_REPLICATE_ON_WRITE`
`static CFMetaData` | `HintsCf`
`static CFMetaData` | `IndexCf`
`java.lang.String` | `ksName`
`static CFMetaData` | `MigrationsCf` Deprecated.
`static CFMetaData` | `NodeIdCf`
`static CFMetaData` | `SchemaCf` Deprecated.
`static CFMetaData` | `SchemaColumnFamiliesCf`
`static CFMetaData` | `SchemaColumnsCf`
`static CFMetaData` | `SchemaKeyspacesCf`
`static CFMetaData` | `StatusCf`
`AbstractType<?>` | `subcolumnComparator`
`static CFMetaData` | `VersionCf`

Constructor Summary
`CFMetaData(java.lang.String keyspace, java.lang.String name, ColumnFamilyType type, AbstractType<?> comp, AbstractType<?> subcc)`

Method Summary
`void` | `addColumnDefinition(ColumnDefinition def)`
`void` | `addDefaultIndexNames()` Convert a null index_name to appropriate default name according to column status
`void` | `apply(CFMetaData cfm)` Updates CFMetaData in-place to match cf_def *Note*: This method left public only for DefsTest, don't use directly!
`static void` | `applyImplicitDefaults(CfDef cf_def)` applies implicit defaults to cf definition.
`CFMetaData` | `bloomFilterFpChance(java.lang.Double prop)`
`CFMetaData` | `caching(CFMetaData.Caching prop)`
`CFMetaData` | `clone()`
`CFMetaData` | `columnAliases(java.util.List<java.nio.ByteBuffer> prop)`
`CFMetaData` | `columnMetadata(ColumnDefinition... cds)`
`CFMetaData` | `columnMetadata(java.util.Map<java.nio.ByteBuffer,ColumnDefinition> prop)`
`CFMetaData` | `comment(java.lang.String prop)`
`CFMetaData` | `compactionStrategyClass(java.lang.Class<? extends AbstractCompactionStrategy> prop)`
`CFMetaData` | `compactionStrategyOptions(java.util.Map<java.lang.String,java.lang.String> prop)`
`CompressionParameters` | `compressionParameters()`
`CFMetaData` | `compressionParameters(CompressionParameters prop)`
`static java.lang.Class<? extends AbstractCompactionStrategy>` | `createCompactionStrategy(java.lang.String className)`
`AbstractCompactionStrategy` | `createCompactionStrategyInstance(ColumnFamilyStore cfs)`
`CFMetaData` | `dcLocalReadRepairChance(double prop)`
`CFMetaData` | `defaultValidator(AbstractType<?> prop)`
`RowMutation` | `dropFromSchema(long timestamp)` Remove all CF attributes from schema
`boolean` | `equals(java.lang.Object obj)`
`static CFMetaData` | `fromSchema(UntypedResultSet.Row result)` Deserialize CF metadata from low-level representation
`static CFMetaData` | `fromThrift(CfDef cf_def)`
`CFMetaData` | `gcGraceSeconds(int prop)`
`java.lang.Double` | `getBloomFilterFpChance()`
`CFMetaData.Caching` | `getCaching()`
`CFDefinition` | `getCfDef()`
`java.util.Map<java.nio.ByteBuffer,ColumnDefinition>` | `getColumn_metadata()`
`java.util.List<java.nio.ByteBuffer>` | `getColumnAliases()`
`ColumnDefinition` | `getColumnDefinition(java.nio.ByteBuffer name)`
`AbstractType<?>` | `getColumnDefinitionComparator(ColumnDefinition def)`
`AbstractType<?>` | `getColumnDefinitionComparator(java.lang.Integer componentIndex)`
`ColumnDefinition` | `getColumnDefinitionForIndex(java.lang.String indexName)`
`IColumnSerializer` | `getColumnSerializer()`
`java.lang.String` | `getComment()`
`AbstractType<?>` | `getComparatorFor(java.nio.ByteBuffer superColumnName)`
`double` | `getDcLocalReadRepair()`
`static java.lang.String` | `getDefaultIndexName(java.lang.String cfName, AbstractType<?> comparator, java.nio.ByteBuffer columnName)`
`AbstractType<?>` | `getDefaultValidator()`
`int` | `getGcGraceSeconds()`
`java.nio.ByteBuffer` | `getKeyAlias()`
`java.nio.ByteBuffer` | `getKeyName()`
`AbstractType<?>` | `getKeyValidator()`
`java.lang.Integer` | `getMaxCompactionThreshold()`
`java.lang.Integer` | `getMinCompactionThreshold()`
`double` | `getReadRepairChance()`
`boolean` | `getReplicateOnWrite()`
`java.nio.ByteBuffer` | `getValueAlias()`
`AbstractType<?>` | `getValueValidator(java.nio.ByteBuffer column)`
`AbstractType<?>` | `getValueValidator(ColumnDefinition columnDefinition)`
`int` | `hashCode()`
`java.lang.String` | `indexColumnFamilyName(ColumnDefinition info)` generate a column family name for an index corresponding to the given column.
`static boolean` | `isIndexNameValid(java.lang.String name)`
`static boolean` | `isNameValid(java.lang.String name)`
`CFMetaData` | `keyAlias(java.nio.ByteBuffer prop)`
`CFMetaData` | `keyAlias(java.lang.String alias)`
`CFMetaData` | `keyValidator(AbstractType<?> prop)`
`CFMetaData` | `maxCompactionThreshold(int prop)`
`CFMetaData` | `minCompactionThreshold(int prop)`
`static CFMetaData` | `newIndexMetadata(CFMetaData parent, ColumnDefinition info, AbstractType<?> columnComparator)`
`CFMetaData` | `readRepairChance(double prop)`
`void` | `reload()`
`CFMetaData` | `reloadSecondaryIndexMetadata(CFMetaData parent)`
`boolean` | `removeColumnDefinition(ColumnDefinition def)`
`static CFMetaData` | `rename(CFMetaData cfm, java.lang.String newName)`
`CFMetaData` | `replicateOnWrite(boolean prop)`
`RowMutation` | `toSchema(long timestamp)` Convert current metadata into schema mutation
`void` | `toSchema(RowMutation rm, long timestamp)`
`RowMutation` | `toSchemaUpdate(CFMetaData newState, long modificationTimestamp)` Create schema mutations to update this metadata to provided new state.
`java.lang.String` | `toString()`
`CfDef` | `toThrift()`
`CFMetaData` | `validate()`
`CFMetaData` | `valueAlias(java.nio.ByteBuffer prop)`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_READ_REPAIR_CHANCE

    public static final double DEFAULT_READ_REPAIR_CHANCE

See Also:
  Constant Field Values

### DEFAULT_DCLOCAL_READ_REPAIR_CHANCE

    public static final double DEFAULT_DCLOCAL_READ_REPAIR_CHANCE

See Also:
  Constant Field Values

### DEFAULT_REPLICATE_ON_WRITE

    public static final boolean DEFAULT_REPLICATE_ON_WRITE

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

### DEFAULT_COMPACTION_STRATEGY_CLASS

    public static final java.lang.String DEFAULT_COMPACTION_STRATEGY_CLASS

See Also:
  Constant Field Values

### DEFAULT_KEY_NAME

    public static final java.nio.ByteBuffer DEFAULT_KEY_NAME

### DEFAULT_CACHING_STRATEGY

    public static final CFMetaData.Caching DEFAULT_CACHING_STRATEGY

### DEFAULT_BF_FP_CHANCE

    public static final java.lang.Double DEFAULT_BF_FP_CHANCE

### DEFAULT_COMPRESSOR

    public static final java.lang.String DEFAULT_COMPRESSOR

### StatusCf

    public static final CFMetaData StatusCf

### HintsCf

    public static final CFMetaData HintsCf

### MigrationsCf

    @Deprecated
    public static final CFMetaData MigrationsCf

  Deprecated.

### SchemaCf

    @Deprecated
    public static final CFMetaData SchemaCf

  Deprecated.

### IndexCf

    public static final CFMetaData IndexCf

### NodeIdCf

    public static final CFMetaData NodeIdCf

### VersionCf

    public static final CFMetaData VersionCf

### SchemaKeyspacesCf

    public static final CFMetaData SchemaKeyspacesCf

### SchemaColumnFamiliesCf

    public static final CFMetaData SchemaColumnFamiliesCf

### SchemaColumnsCf

    public static final CFMetaData SchemaColumnsCf

### cfId

    public final java.lang.Integer cfId

### ksName

    public final java.lang.String ksName

### cfName

    public final java.lang.String cfName

### cfType

    public final ColumnFamilyType cfType

### comparator

    public AbstractType<?> comparator

### subcolumnComparator

    public AbstractType<?> subcolumnComparator

### compactionStrategyClass

    public java.lang.Class<? extends AbstractCompactionStrategy> compactionStrategyClass

### compactionStrategyOptions

    public java.util.Map<java.lang.String,java.lang.String> compactionStrategyOptions

### compressionParameters

    public CompressionParameters compressionParameters

Constructor Detail

### CFMetaData

    public CFMetaData(java.lang.String keyspace,
                      java.lang.String name,
                      ColumnFamilyType type,
                      AbstractType<?> comp,
                      AbstractType<?> subcc)

Method Detail

### comment

    public CFMetaData comment(java.lang.String prop)

### readRepairChance

    public CFMetaData readRepairChance(double prop)

### dcLocalReadRepairChance

    public CFMetaData dcLocalReadRepairChance(double prop)

### replicateOnWrite

    public CFMetaData replicateOnWrite(boolean prop)

### gcGraceSeconds

    public CFMetaData gcGraceSeconds(int prop)

### defaultValidator

    public CFMetaData defaultValidator(AbstractType<?> prop)

### keyValidator

    public CFMetaData keyValidator(AbstractType<?> prop)

### minCompactionThreshold

    public CFMetaData minCompactionThreshold(int prop)

### maxCompactionThreshold

    public CFMetaData maxCompactionThreshold(int prop)

### keyAlias

    public CFMetaData keyAlias(java.nio.ByteBuffer prop)

### keyAlias

    public CFMetaData keyAlias(java.lang.String alias)

### columnAliases

    public CFMetaData columnAliases(java.util.List<java.nio.ByteBuffer> prop)

### valueAlias

    public CFMetaData valueAlias(java.nio.ByteBuffer prop)

### columnMetadata

    public CFMetaData columnMetadata(java.util.Map<java.nio.ByteBuffer,ColumnDefinition> prop)

### columnMetadata

    public CFMetaData columnMetadata(ColumnDefinition... cds)

### compactionStrategyClass

    public CFMetaData compactionStrategyClass(java.lang.Class<? extends AbstractCompactionStrategy> prop)

### compactionStrategyOptions

    public CFMetaData compactionStrategyOptions(java.util.Map<java.lang.String,java.lang.String> prop)

### compressionParameters

    public CFMetaData compressionParameters(CompressionParameters prop)

### bloomFilterFpChance

    public CFMetaData bloomFilterFpChance(java.lang.Double prop)

### caching

    public CFMetaData caching(CFMetaData.Caching prop)

### newIndexMetadata

    public static CFMetaData newIndexMetadata(CFMetaData parent,
                                              ColumnDefinition info,
                                              AbstractType<?> columnComparator)

### reloadSecondaryIndexMetadata

    public CFMetaData reloadSecondaryIndexMetadata(CFMetaData parent)

### clone

    public CFMetaData clone()

  Overrides:
    `clone` in class `java.lang.Object`

### rename

    public static CFMetaData rename(CFMetaData cfm,
                                    java.lang.String newName)

### indexColumnFamilyName

    public java.lang.String indexColumnFamilyName(ColumnDefinition info)

  generate a column family name for an index corresponding to the given column. This is NOT the same as the index's name! This is only used in sstable filenames and is not exposed to users.

  Parameters:
    `info` - A definition of the column with index
  Returns:
    name of the index ColumnFamily

### getComment

    public java.lang.String getComment()

### getReadRepairChance

    public double getReadRepairChance()

### getDcLocalReadRepair

    public double getDcLocalReadRepair()

### getReplicateOnWrite

    public boolean getReplicateOnWrite()

### getGcGraceSeconds

    public int getGcGraceSeconds()

### getDefaultValidator

    public AbstractType<?> getDefaultValidator()

### getKeyValidator

    public AbstractType<?> getKeyValidator()

### getMinCompactionThreshold

    public java.lang.Integer getMinCompactionThreshold()

### getMaxCompactionThreshold

    public java.lang.Integer getMaxCompactionThreshold()

### getKeyName

    public java.nio.ByteBuffer getKeyName()

### getKeyAlias

    public java.nio.ByteBuffer getKeyAlias()

### getColumnAliases

    public java.util.List<java.nio.ByteBuffer> getColumnAliases()

### getValueAlias

    public java.nio.ByteBuffer getValueAlias()

### compressionParameters

    public CompressionParameters compressionParameters()

### getColumn_metadata

    public java.util.Map<java.nio.ByteBuffer,ColumnDefinition> getColumn_metadata()

### getComparatorFor

    public AbstractType<?> getComparatorFor(java.nio.ByteBuffer superColumnName)

### getBloomFilterFpChance

    public java.lang.Double getBloomFilterFpChance()

### getCaching

    public CFMetaData.Caching getCaching()

### 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(java.nio.ByteBuffer column)

### getValueValidator

    public AbstractType<?> getValueValidator(ColumnDefinition columnDefinition)

### applyImplicitDefaults

    public static void applyImplicitDefaults(CfDef cf_def)

  applies implicit defaults to cf definition. useful in updates

### fromThrift

    public static CFMetaData fromThrift(CfDef cf_def)
                                 throws InvalidRequestException,
                                        ConfigurationException

  Throws:
    `InvalidRequestException`
    `ConfigurationException`

### reload

    public void reload()
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### apply

    public void apply(CFMetaData cfm)
               throws ConfigurationException

  Updates CFMetaData in-place to match cf_def *Note*: This method left public only for DefsTest, don't use directly!

  Throws:
    `ConfigurationException` - if ks/cf names or cf ids didn't match

### createCompactionStrategy

    public static java.lang.Class<? extends AbstractCompactionStrategy> createCompactionStrategy(java.lang.String className)
                                                                                          throws ConfigurationException

  Throws:
    `ConfigurationException`

### createCompactionStrategyInstance

    public AbstractCompactionStrategy createCompactionStrategyInstance(ColumnFamilyStore cfs)

### toThrift

    public CfDef toThrift()

### getColumnDefinition

    public ColumnDefinition getColumnDefinition(java.nio.ByteBuffer name)

### getColumnDefinitionForIndex

    public ColumnDefinition getColumnDefinitionForIndex(java.lang.String indexName)

### addDefaultIndexNames

    public void addDefaultIndexNames()
                              throws ConfigurationException

  Convert a null index_name to appropriate default name according to column status

  Throws:
    `ConfigurationException`

### getDefaultIndexName

    public static java.lang.String getDefaultIndexName(java.lang.String cfName,
                                                       AbstractType<?> comparator,
                                                       java.nio.ByteBuffer columnName)

### getColumnSerializer

    public IColumnSerializer getColumnSerializer()

### isNameValid

    public static boolean isNameValid(java.lang.String name)

### isIndexNameValid

    public static boolean isIndexNameValid(java.lang.String name)

### validate

    public CFMetaData validate()
                        throws ConfigurationException

  Throws:
    `ConfigurationException`

### toSchemaUpdate

    public RowMutation toSchemaUpdate(CFMetaData newState,
                                      long modificationTimestamp)

  Create schema mutations to update this metadata to provided new state.

  Parameters:
    `newState` - The new metadata (for the same CF)
    `modificationTimestamp` - Timestamp to use for mutation
  Returns:
    Difference between attributes in form of schema mutation

### dropFromSchema

    public RowMutation dropFromSchema(long timestamp)

  Remove all CF attributes from schema

  Parameters:
    `timestamp` - Timestamp to use
  Returns:
    RowMutation to use to completely remove cf from schema

### toSchema

    public void toSchema(RowMutation rm,
                         long timestamp)

### fromSchema

    public static CFMetaData fromSchema(UntypedResultSet.Row result)

  Deserialize CF metadata from low-level representation

  Returns:
    Thrift-based metadata deserialized from schema
  Throws:
    `java.io.IOException` - on any I/O related error

### toSchema

    public RowMutation toSchema(long timestamp)
                         throws ConfigurationException

  Convert current metadata into schema mutation

  Parameters:
    `timestamp` - Timestamp to use
  Returns:
    Low-level representation of the CF
  Throws:
    `ConfigurationException` - if any of the attributes didn't pass validation

### getColumnDefinitionComparator

    public AbstractType<?> getColumnDefinitionComparator(ColumnDefinition def)

### getColumnDefinitionComparator

    public AbstractType<?> getColumnDefinitionComparator(java.lang.Integer componentIndex)

### addColumnDefinition

    public void addColumnDefinition(ColumnDefinition def)

### removeColumnDefinition

    public boolean removeColumnDefinition(ColumnDefinition def)

### getCfDef

    public CFDefinition getCfDef()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 The Apache Software Foundation