public class CQL3CasRequest extends java.lang.Object implements CASRequest
Modifier and Type | Field and Description |
---|---|
CFMetaData |
cfm |
boolean |
isBatch |
DecoratedKey |
key |
Constructor and Description |
---|
CQL3CasRequest(CFMetaData cfm,
DecoratedKey key,
boolean isBatch,
PartitionColumns conditionColumns,
boolean updatesRegularRows,
boolean updatesStaticRow) |
Modifier and Type | Method and Description |
---|---|
void |
addConditions(Clustering clustering,
java.util.Collection<ColumnCondition> conds,
QueryOptions options) |
void |
addExist(Clustering clustering) |
void |
addNotExist(Clustering clustering) |
void |
addRangeDeletion(Slice slice,
ModificationStatement stmt,
QueryOptions options,
long timestamp) |
void |
addRowUpdate(Clustering clustering,
ModificationStatement stmt,
QueryOptions options,
long timestamp) |
boolean |
appliesTo(FilteredPartition current)
Checks whether the conditions represented by this object applies provided the current state of the partition on
which those conditions are.
|
PartitionUpdate |
makeUpdates(FilteredPartition current)
The updates to perform of a CAS success.
|
SinglePartitionReadCommand |
readCommand(int nowInSec)
The command to use to fetch the value to compare for the CAS.
|
public final CFMetaData cfm
public final DecoratedKey key
public final boolean isBatch
public CQL3CasRequest(CFMetaData cfm, DecoratedKey key, boolean isBatch, PartitionColumns conditionColumns, boolean updatesRegularRows, boolean updatesStaticRow)
public void addRowUpdate(Clustering clustering, ModificationStatement stmt, QueryOptions options, long timestamp)
public void addRangeDeletion(Slice slice, ModificationStatement stmt, QueryOptions options, long timestamp)
public void addNotExist(Clustering clustering) throws InvalidRequestException
InvalidRequestException
public void addExist(Clustering clustering) throws InvalidRequestException
InvalidRequestException
public void addConditions(Clustering clustering, java.util.Collection<ColumnCondition> conds, QueryOptions options) throws InvalidRequestException
InvalidRequestException
public SinglePartitionReadCommand readCommand(int nowInSec)
CASRequest
readCommand
in interface CASRequest
public boolean appliesTo(FilteredPartition current) throws InvalidRequestException
appliesTo
in interface CASRequest
current
- the partition with current data corresponding to these conditions. More precisely, this must be
the result of executing the command returned by readCommand(int)
. This can be empty but it should not be
null
.InvalidRequestException
public PartitionUpdate makeUpdates(FilteredPartition current) throws InvalidRequestException
CASRequest
makeUpdates
in interface CASRequest
InvalidRequestException
Copyright © 2021 The Apache Software Foundation