ThriftValidation (apache-cassandra API)
Date: 2012-05-04

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.thrift
Class ThriftValidation

    java.lang.Object
      org.apache.cassandra.thrift.ThriftValidation

    public class ThriftValidation

extends java.lang.Object

This has a lot of building blocks for CassandraServer to call to make sure it has valid input -- ensuring column names conform to the declared comparator, for instance. The methods here mostly try to do just one part of the validation so they can be combined for different needs -- supercolumns vs regular, range slices vs named, batch vs single-column. (ValidateColumnPath is the main exception in that it includes table and CF validation.)

Constructor Summary
`ThriftValidation()`

Method Summary
`static void` | `validateCfDef(CfDef cf_def, CFMetaData old)`
`static void` | `validateColumnData(CFMetaData metadata, Column column, boolean isSubColumn)` Validates the data part of the column (everything in the Column object but the name, which is assumed to be valid)
`static CFMetaData` | `validateColumnFamily(java.lang.String tablename, java.lang.String cfName)`
`static CFMetaData` | `validateColumnFamily(java.lang.String tablename, java.lang.String cfName, boolean isCommutativeOp)`
`static void` | `validateColumnNames(CFMetaData metadata, ColumnParent column_parent, java.lang.Iterable<java.nio.ByteBuffer> column_names)`
`static void` | `validateColumnOrSuperColumn(CFMetaData metadata, ColumnOrSuperColumn cosc)`
`static void` | `validateColumnParent(CFMetaData metadata, ColumnParent column_parent)`
`static void` | `validateColumnPath(CFMetaData metadata, ColumnPath column_path)` validates all parts of the path to the column, including the column name
`static void` | `validateCommutativeForWrite(CFMetaData metadata, ConsistencyLevel consistency)`
`static void` | `validateConsistencyLevel(java.lang.String table, ConsistencyLevel cl)`
`static void` | `validateDeletion(CFMetaData metadata, Deletion del)`
`static void` | `validateIndexClauses(CFMetaData metadata, IndexClause index_clause)`
`static void` | `validateKey(CFMetaData metadata, java.nio.ByteBuffer key)`
`static void` | `validateKeyRange(KeyRange range)`
`static void` | `validateKeyspaceNotSystem(java.lang.String modifiedKeyspace)`
`static void` | `validateKeyspaceNotYetExisting(java.lang.String newKsName)`
`static void` | `validateKsDef(KsDef ks_def)`
`static void` | `validateMinCompactionThreshold(int min_compaction_threshold, int max_compaction_threshold)`
`static void` | `validateMinMaxCompactionThresholds(CfDef cf_def)`
`static void` | `validateMutation(CFMetaData metadata, Mutation mut)`
`static void` | `validatePredicate(CFMetaData metadata, ColumnParent column_parent, SlicePredicate predicate)`
`static void` | `validateRange(CFMetaData metadata, ColumnParent column_parent, SliceRange range)`
`static void` | `validateSlicePredicate(CFMetaData metadata, java.nio.ByteBuffer scName, SlicePredicate predicate)`
`static void` | `validateTable(java.lang.String tablename)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ThriftValidation

    public ThriftValidation()

Method Detail

### validateKey

    public static void validateKey(CFMetaData metadata,
                                   java.nio.ByteBuffer key)
                            throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateTable

    public static void validateTable(java.lang.String tablename)
                              throws KeyspaceNotDefinedException

  Throws:
    `KeyspaceNotDefinedException`

### validateConsistencyLevel

    public static void validateConsistencyLevel(java.lang.String table,
                                                ConsistencyLevel cl)
                                         throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateColumnFamily

    public static CFMetaData validateColumnFamily(java.lang.String tablename,
                                                  java.lang.String cfName,
                                                  boolean isCommutativeOp)
                                           throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateColumnFamily

    public static CFMetaData validateColumnFamily(java.lang.String tablename,
                                                  java.lang.String cfName)
                                           throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateColumnPath

    public static void validateColumnPath(CFMetaData metadata,
                                          ColumnPath column_path)
                                   throws InvalidRequestException

  validates all parts of the path to the column, including the column name

  Throws:
    `InvalidRequestException`

### validateColumnParent

    public static void validateColumnParent(CFMetaData metadata,
                                            ColumnParent column_parent)
                                     throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateColumnNames

    public static void validateColumnNames(CFMetaData metadata,
                                           ColumnParent column_parent,
                                           java.lang.Iterable<java.nio.ByteBuffer> column_names)
                                    throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateRange

    public static void validateRange(CFMetaData metadata,
                                     ColumnParent column_parent,
                                     SliceRange range)
                              throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateColumnOrSuperColumn

    public static void validateColumnOrSuperColumn(CFMetaData metadata,
                                                   ColumnOrSuperColumn cosc)
                                            throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateMutation

    public static void validateMutation(CFMetaData metadata,
                                        Mutation mut)
                                 throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateDeletion

    public static void validateDeletion(CFMetaData metadata,
                                        Deletion del)
                                 throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateSlicePredicate

    public static void validateSlicePredicate(CFMetaData metadata,
                                              java.nio.ByteBuffer scName,
                                              SlicePredicate predicate)
                                       throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateColumnData

    public static void validateColumnData(CFMetaData metadata,
                                          Column column,
                                          boolean isSubColumn)
                                   throws InvalidRequestException

  Validates the data part of the column (everything in the Column object but the name, which is assumed to be valid)

  Throws:
    `InvalidRequestException`

### validatePredicate

    public static void validatePredicate(CFMetaData metadata,
                                         ColumnParent column_parent,
                                         SlicePredicate predicate)
                                  throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateKeyRange

    public static void validateKeyRange(KeyRange range)
                                 throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateIndexClauses

    public static void validateIndexClauses(CFMetaData metadata,
                                            IndexClause index_clause)
                                     throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateCfDef

    public static void validateCfDef(CfDef cf_def,
                                     CFMetaData old)
                              throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateCommutativeForWrite

    public static void validateCommutativeForWrite(CFMetaData metadata,
                                                   ConsistencyLevel consistency)
                                            throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateKsDef

    public static void validateKsDef(KsDef ks_def)
                              throws ConfigurationException

  Throws:
    `ConfigurationException`

### validateMinMaxCompactionThresholds

    public static void validateMinMaxCompactionThresholds(CfDef cf_def)
                                                   throws ConfigurationException

  Throws:
    `ConfigurationException`

### validateMinCompactionThreshold

    public static void validateMinCompactionThreshold(int min_compaction_threshold,
                                                      int max_compaction_threshold)
                                               throws ConfigurationException

  Throws:
    `ConfigurationException`

### validateKeyspaceNotYetExisting

    public static void validateKeyspaceNotYetExisting(java.lang.String newKsName)
                                               throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateKeyspaceNotSystem

    public static void validateKeyspaceNotSystem(java.lang.String modifiedKeyspace)
                                          throws InvalidRequestException

  Throws:
    `InvalidRequestException`

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 © 2012 The Apache Software Foundation