Package org.apache.cassandra.service
Interface CASRequest
-
- All Known Implementing Classes:
CQL3CasRequest
public interface CASRequest
Abstract the conditions and updates for a CAS operation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
appliesTo(FilteredPartition current)
Returns whether the provided CF, that represents the values fetched using the readFilter(), match the CAS conditions this object stands for.PartitionUpdate
makeUpdates(FilteredPartition current, ClientState clientState, Ballot ballot)
The updates to perform of a CAS success.SinglePartitionReadCommand
readCommand(long nowInSec)
The command to use to fetch the value to compare for the CAS.
-
-
-
Method Detail
-
readCommand
SinglePartitionReadCommand readCommand(long nowInSec)
The command to use to fetch the value to compare for the CAS.
-
appliesTo
boolean appliesTo(FilteredPartition current) throws InvalidRequestException
Returns whether the provided CF, that represents the values fetched using the readFilter(), match the CAS conditions this object stands for.- Throws:
InvalidRequestException
-
makeUpdates
PartitionUpdate makeUpdates(FilteredPartition current, ClientState clientState, Ballot ballot) throws InvalidRequestException
The updates to perform of a CAS success. The values fetched using the readFilter() are passed as argument.- Throws:
InvalidRequestException
-
-