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` | `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, RequestType requestType)`
`static void` | `validateDeletion(CFMetaData metadata, Deletion del)`
`static boolean` | `validateFilterClauses(CFMetaData metadata, java.util.List<IndexExpression> index_clause)`
`static void` | `validateIndexClauses(CFMetaData metadata, IndexClause index_clause)`
`static void` | `validateKey(CFMetaData metadata, java.nio.ByteBuffer key)`
`static void` | `validateKeyRange(CFMetaData metadata, java.nio.ByteBuffer superColumn, KeyRange range)`
`static void` | `validateKeyspaceNotSystem(java.lang.String modifiedKeyspace)`
`static void` | `validateKeyspaceNotYetExisting(java.lang.String newKsName)`
`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,
                                                RequestType requestType)
                                         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(CFMetaData metadata,
                                        java.nio.ByteBuffer superColumn,
                                        KeyRange range)
                                 throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateIndexClauses

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

  Throws:
    `InvalidRequestException`

### validateFilterClauses

    public static boolean validateFilterClauses(CFMetaData metadata,
                                                java.util.List<IndexExpression> index_clause)
                                         throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### validateCommutativeForWrite

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

  Throws:
    `InvalidRequestException`

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