CQL3CasRequest (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.cql3.statements

## Class CQL3CasRequest

- java.lang.Object
- - org.apache.cassandra.cql3.statements.CQL3CasRequest

- All Implemented Interfaces:
    CASRequest

      public class CQL3CasRequest
      extends java.lang.Object
      implements CASRequest

  Processed CAS conditions and update on potentially multiple rows of the same partition.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CQL3CasRequest(CFMetaData cfm, java.nio.ByteBuffer key, boolean isBatch)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConditions(Composite prefix, java.util.Collection<ColumnCondition> conds, QueryOptions options)`
    `void` | `addExist(Composite prefix)`
    `void` | `addNotExist(Composite prefix)`
    `void` | `addRowUpdate(Composite prefix, ModificationStatement stmt, QueryOptions options, long timestamp)`
    `boolean` | `appliesTo(ColumnFamily current)` Returns whether the provided CF, that represents the values fetched using the readFilter(), match the CAS conditions this object stands for.
    `ColumnFamily` | `makeUpdates(ColumnFamily current)` The updates to perform of a CAS success.
    `IDiskAtomFilter` | `readFilter()` The filter to use to fetch the value to compare for the CAS.

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

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

- - ### Constructor Detail

    - #### CQL3CasRequest

          public CQL3CasRequest(CFMetaData cfm,
                                java.nio.ByteBuffer key,
                                boolean isBatch)

  - ### Method Detail

    - #### addRowUpdate

          public void addRowUpdate(Composite prefix,
                                   ModificationStatement stmt,
                                   QueryOptions options,
                                   long timestamp)

    - #### addNotExist

          public void addNotExist(Composite prefix)
                           throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### addExist

          public void addExist(Composite prefix)
                        throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### addConditions

          public void addConditions(Composite prefix,
                                    java.util.Collection<ColumnCondition> conds,
                                    QueryOptions options)
                             throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### readFilter

          public IDiskAtomFilter readFilter()

      Description copied from interface: `CASRequest`
      The filter to use to fetch the value to compare for the CAS.
      Specified by:
        `readFilter` in interface `CASRequest`

    - #### appliesTo

          public boolean appliesTo(ColumnFamily current)
                            throws InvalidRequestException

      Description copied from interface: `CASRequest`
      Returns whether the provided CF, that represents the values fetched using the readFilter(), match the CAS conditions this object stands for.
      Specified by:
        `appliesTo` in interface `CASRequest`
      Throws:
        `InvalidRequestException`

    - #### makeUpdates

          public ColumnFamily makeUpdates(ColumnFamily current)
                                   throws InvalidRequestException

      Description copied from interface: `CASRequest`
      The updates to perform of a CAS success. The values fetched using the readFilter() are passed as argument.
      Specified by:
        `makeUpdates` in interface `CASRequest`
      Throws:
        `InvalidRequestException`

Copyright © 2018 The Apache Software Foundation