public class CQL3CasRequest extends java.lang.Object implements CASRequest
Modifier and Type | Field and Description |
---|---|
DecoratedKey |
key |
TableMetadata |
metadata |
Constructor and Description |
---|
CQL3CasRequest(TableMetadata metadata,
DecoratedKey key,
RegularAndStaticColumns 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) |
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.
|
SinglePartitionReadQuery |
readCommand(int nowInSec)
The command to use to fetch the value to compare for the CAS.
|
java.lang.String |
toString() |
public final TableMetadata metadata
public final DecoratedKey key
public CQL3CasRequest(TableMetadata metadata, DecoratedKey key, RegularAndStaticColumns conditionColumns, boolean updatesRegularRows, boolean updatesStaticRow)
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 SinglePartitionReadQuery 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
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009-2021 The Apache Software Foundation