Operation (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.cql3

## Class Operation

- java.lang.Object
- - org.apache.cassandra.cql3.Operation

- Direct Known Subclasses:
    Constants.Adder, Constants.Deleter, Constants.Setter, Constants.Substracter, Lists.Appender, Lists.Discarder, Lists.DiscarderByIndex, Lists.Prepender, Lists.Setter, Lists.SetterByIndex, Maps.DiscarderByKey, Maps.Putter, Maps.Setter, Maps.SetterByKey, Sets.Adder, Sets.Discarder, Sets.Setter

      public abstract class Operation
      extends java.lang.Object

  An UPDATE or DELETE operation. For UPDATE this includes: - setting a constant - counter operations - collections operations and for DELETE: - deleting a column - deleting an element of collection column Fine grained operation are obtained from their raw counterpart (Operation.Raw, which correspond to a parsed, non-checked operation) by provided the receiver for the operation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Operation.Addition`
    `static class` | `Operation.ColumnDeletion`
    `static class` | `Operation.ElementDeletion`
    `static class` | `Operation.Prepend`
    `static interface` | `Operation.RawDeletion` A parsed raw DELETE operation.
    `static interface` | `Operation.RawUpdate` A parsed raw UPDATE operation.
    `static class` | `Operation.SetElement`
    `static class` | `Operation.SetValue`
    `static class` | `Operation.Substraction`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ColumnDefinition` | `column`
    `protected Term` | `t`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Operation(ColumnDefinition column, Term t)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `collectMarkerSpecification(VariableSpecifications boundNames)` Collects the column specification for the bind variables of this operation.
    `abstract void` | `execute(java.nio.ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params)` Execute the operation.
    `boolean` | `requiresRead()`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### column

          public final ColumnDefinition column

    - #### t

          protected final Term t

  - ### Constructor Detail

    - #### Operation

          protected Operation(ColumnDefinition column,
                   Term t)

  - ### Method Detail

    - #### requiresRead

          public boolean requiresRead()

      Returns:
        whether the operation requires a read of the previous value to be executed (only lists setterByIdx, discard and discardByIdx requires that).

    - #### collectMarkerSpecification

          public void collectMarkerSpecification(VariableSpecifications boundNames)

      Collects the column specification for the bind variables of this operation.
      Parameters:
        `boundNames` - the list of column specification where to collect the bind variables of this term in.

    - #### execute

          public abstract void execute(java.nio.ByteBuffer rowKey,
                     ColumnFamily cf,
                     Composite prefix,
                     UpdateParameters params)
                                throws InvalidRequestException

      Execute the operation.
      Parameters:
        `rowKey` - row key for the update.
        `cf` - the column family to which to add the updates generated by this operation.
        `prefix` - the prefix that identify the CQL3 row this operation applies to.
        `params` - parameters of the update.
      Throws:
        `InvalidRequestException`

Copyright © 2014 The Apache Software Foundation