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
Modifier and TypeMethodDescriptionbooleanappliesTo(FilteredPartition current) Returns whether the provided CF, that represents the values fetched using the readFilter(), match the CAS conditions this object stands for.makeUpdates(FilteredPartition current, ClientState clientState, Ballot ballot) The updates to perform of a CAS success.readCommand(long nowInSec) The command to use to fetch the value to compare for the CAS.
-
Method Details
-
readCommand
The command to use to fetch the value to compare for the CAS. -
appliesTo
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
-