org.apache.cassandra.config

## Class KSMetaData

- java.lang.Object
- - org.apache.cassandra.config.KSMetaData

-     public final class KSMetaData
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `durableWrites`
    `java.lang.String` | `name`
    `java.lang.Class<? extends AbstractReplicationStrategy>` | `strategyClass`
    `java.util.Map<java.lang.String,java.lang.String>` | `strategyOptions`
    `UTMetaData` | `userTypes`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.String,CFMetaData>` | `cfMetaData()`
    `static KSMetaData` | `cloneWith(KSMetaData ksm, java.lang.Iterable<CFMetaData> cfDefs)`
    `static java.util.Map<java.lang.String,CFMetaData>` | `deserializeColumnFamilies(Row row)` Deserialize ColumnFamilies from low-level schema representation, all of them belong to the same keyspace
    `Mutation` | `dropFromSchema(long timestamp)`
    `boolean` | `equals(java.lang.Object o)`
    `static KSMetaData` | `fromSchema(Row row, java.lang.Iterable<CFMetaData> cfms, UTMetaData userTypes)` Deserialize only Keyspace attributes without nested ColumnFamilies
    `static KSMetaData` | `fromSchema(Row serializedKs, Row serializedCFs, Row serializedUserTypes)` Deserialize Keyspace with nested ColumnFamilies
    `static KSMetaData` | `fromThrift(KsDef ksd, CFMetaData... cfDefs)`
    `int` | `hashCode()`
    `static KSMetaData` | `newKeyspace(java.lang.String name, java.lang.Class<? extends AbstractReplicationStrategy> strategyClass, java.util.Map<java.lang.String,java.lang.String> options, boolean durablesWrites, java.lang.Iterable<CFMetaData> cfDefs)`
    `static KSMetaData` | `newKeyspace(java.lang.String name, java.lang.String strategyName, java.util.Map<java.lang.String,java.lang.String> options, boolean durableWrites)`
    `static java.util.Map<java.lang.String,java.lang.String>` | `optsWithRF(java.lang.Integer rf)`
    `KSMetaData` | `reloadAttributes()`
    `static KSMetaData` | `systemKeyspace()`
    `static KSMetaData` | `testMetadata(java.lang.String name, java.lang.Class<? extends AbstractReplicationStrategy> strategyClass, java.util.Map<java.lang.String,java.lang.String> strategyOptions, CFMetaData... cfDefs)`
    `static KSMetaData` | `testMetadataNotDurable(java.lang.String name, java.lang.Class<? extends AbstractReplicationStrategy> strategyClass, java.util.Map<java.lang.String,java.lang.String> strategyOptions, CFMetaData... cfDefs)`
    `Mutation` | `toSchema(long timestamp)`
    `Mutation` | `toSchemaUpdate(KSMetaData newState, long modificationTimestamp)`
    `java.lang.String` | `toString()`
    `KsDef` | `toThrift()`
    `static KSMetaData` | `traceKeyspace()`
    `KSMetaData` | `validate()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### name

          public final java.lang.String name

    - #### strategyClass

          public final java.lang.Class<? extends AbstractReplicationStrategy> strategyClass

    - #### strategyOptions

          public final java.util.Map<java.lang.String,java.lang.String> strategyOptions

    - #### durableWrites

          public final boolean durableWrites

    - #### userTypes

          public final UTMetaData userTypes

  - ### Method Detail

    - #### newKeyspace

          public static KSMetaData newKeyspace(java.lang.String name,
                               java.lang.String strategyName,
                               java.util.Map<java.lang.String,java.lang.String> options,
                               boolean durableWrites)
                                        throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### newKeyspace

          public static KSMetaData newKeyspace(java.lang.String name,
                               java.lang.Class<? extends AbstractReplicationStrategy> strategyClass,
                               java.util.Map<java.lang.String,java.lang.String> options,
                               boolean durablesWrites,
                               java.lang.Iterable<CFMetaData> cfDefs)

    - #### cloneWith

          public static KSMetaData cloneWith(KSMetaData ksm,
                             java.lang.Iterable<CFMetaData> cfDefs)

    - #### systemKeyspace

          public static KSMetaData systemKeyspace()

    - #### traceKeyspace

          public static KSMetaData traceKeyspace()

    - #### testMetadata

          public static KSMetaData testMetadata(java.lang.String name,
                                java.lang.Class<? extends AbstractReplicationStrategy> strategyClass,
                                java.util.Map<java.lang.String,java.lang.String> strategyOptions,
                                CFMetaData... cfDefs)

    - #### testMetadataNotDurable

          public static KSMetaData testMetadataNotDurable(java.lang.String name,
                                          java.lang.Class<? extends AbstractReplicationStrategy> strategyClass,
                                          java.util.Map<java.lang.String,java.lang.String> strategyOptions,
                                          CFMetaData... cfDefs)

    - #### hashCode

          public int hashCode()

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

    - #### equals

          public boolean equals(java.lang.Object o)

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

    - #### cfMetaData

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

    - #### toString

          public java.lang.String toString()

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

    - #### optsWithRF

          public static java.util.Map<java.lang.String,java.lang.String> optsWithRF(java.lang.Integer rf)

    - #### fromThrift

          public static KSMetaData fromThrift(KsDef ksd,
                              CFMetaData... cfDefs)
                                       throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### toThrift

          public KsDef toThrift()

    - #### toSchemaUpdate

          public Mutation toSchemaUpdate(KSMetaData newState,
                                long modificationTimestamp)

    - #### validate

          public KSMetaData validate()
                              throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### reloadAttributes

          public KSMetaData reloadAttributes()

    - #### dropFromSchema

          public Mutation dropFromSchema(long timestamp)

    - #### toSchema

          public Mutation toSchema(long timestamp)

    - #### fromSchema

          public static KSMetaData fromSchema(Row row,
                              java.lang.Iterable<CFMetaData> cfms,
                              UTMetaData userTypes)

      Deserialize only Keyspace attributes without nested ColumnFamilies
      Parameters:
        `row` - Keyspace attributes in serialized form
      Returns:
        deserialized keyspace without cf_defs

    - #### fromSchema

          public static KSMetaData fromSchema(Row serializedKs,
                              Row serializedCFs,
                              Row serializedUserTypes)

      Deserialize Keyspace with nested ColumnFamilies
      Parameters:
        `serializedKs` - Keyspace in serialized form
        `serializedCFs` - Collection of the serialized ColumnFamilies
      Returns:
        deserialized keyspace with cf_defs

    - #### deserializeColumnFamilies

          public static java.util.Map<java.lang.String,CFMetaData> deserializeColumnFamilies(Row row)

      Deserialize ColumnFamilies from low-level schema representation, all of them belong to the same keyspace
      Returns:
        map containing name of the ColumnFamily and it's metadata for faster lookup

Copyright © 2014 The Apache Software Foundation