Package org.apache.cassandra.cql3
Class UpdateParameters
- java.lang.Object
-
- org.apache.cassandra.cql3.UpdateParameters
-
public class UpdateParameters extends java.lang.Object
Groups the parameters of an update query, and make building updates easier.
-
-
Field Summary
Fields Modifier and Type Field Description ClientState
clientState
TableMetadata
metadata
QueryOptions
options
RegularAndStaticColumns
updatedColumns
-
Constructor Summary
Constructors Constructor Description UpdateParameters(TableMetadata metadata, RegularAndStaticColumns updatedColumns, ClientState clientState, QueryOptions options, long timestamp, long nowInSec, int ttl, java.util.Map<DecoratedKey,Partition> prefetchedRows)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cell<?>
addCell(ColumnMetadata column, java.nio.ByteBuffer value)
Cell<?>
addCell(ColumnMetadata column, CellPath path, java.nio.ByteBuffer value)
void
addCounter(ColumnMetadata column, long increment)
void
addPrimaryKeyLivenessInfo()
void
addRowDeletion()
void
addTombstone(ColumnMetadata column)
void
addTombstone(ColumnMetadata column, CellPath path)
Row
buildRow()
Clustering<?>
currentClustering()
DeletionTime
deletionTime()
Row
getPrefetchedRow(DecoratedKey key, Clustering<?> clustering)
Returns the prefetched row with the already performed modifications.RangeTombstone
makeRangeTombstone(ClusteringComparator comparator, Clustering<?> clustering)
RangeTombstone
makeRangeTombstone(Slice slice)
<V> void
newRow(Clustering<V> clustering)
byte[]
nextTimeUUIDAsBytes()
void
setComplexDeletionTime(ColumnMetadata column)
void
setComplexDeletionTimeForOverwrite(ColumnMetadata column)
-
-
-
Field Detail
-
metadata
public final TableMetadata metadata
-
updatedColumns
public final RegularAndStaticColumns updatedColumns
-
clientState
public final ClientState clientState
-
options
public final QueryOptions options
-
-
Constructor Detail
-
UpdateParameters
public UpdateParameters(TableMetadata metadata, RegularAndStaticColumns updatedColumns, ClientState clientState, QueryOptions options, long timestamp, long nowInSec, int ttl, java.util.Map<DecoratedKey,Partition> prefetchedRows) throws InvalidRequestException
- Throws:
InvalidRequestException
-
-
Method Detail
-
newRow
public <V> void newRow(Clustering<V> clustering) throws InvalidRequestException
- Throws:
InvalidRequestException
-
currentClustering
public Clustering<?> currentClustering()
-
addPrimaryKeyLivenessInfo
public void addPrimaryKeyLivenessInfo()
-
addRowDeletion
public void addRowDeletion()
-
addTombstone
public void addTombstone(ColumnMetadata column) throws InvalidRequestException
- Throws:
InvalidRequestException
-
addTombstone
public void addTombstone(ColumnMetadata column, CellPath path) throws InvalidRequestException
- Throws:
InvalidRequestException
-
addCell
public Cell<?> addCell(ColumnMetadata column, java.nio.ByteBuffer value) throws InvalidRequestException
- Throws:
InvalidRequestException
-
addCell
public Cell<?> addCell(ColumnMetadata column, CellPath path, java.nio.ByteBuffer value) throws InvalidRequestException
- Throws:
InvalidRequestException
-
addCounter
public void addCounter(ColumnMetadata column, long increment) throws InvalidRequestException
- Throws:
InvalidRequestException
-
setComplexDeletionTime
public void setComplexDeletionTime(ColumnMetadata column)
-
setComplexDeletionTimeForOverwrite
public void setComplexDeletionTimeForOverwrite(ColumnMetadata column)
-
buildRow
public Row buildRow()
-
deletionTime
public DeletionTime deletionTime()
-
makeRangeTombstone
public RangeTombstone makeRangeTombstone(ClusteringComparator comparator, Clustering<?> clustering)
-
makeRangeTombstone
public RangeTombstone makeRangeTombstone(Slice slice)
-
nextTimeUUIDAsBytes
public byte[] nextTimeUUIDAsBytes()
-
getPrefetchedRow
public Row getPrefetchedRow(DecoratedKey key, Clustering<?> clustering)
Returns the prefetched row with the already performed modifications.If no modification have yet been performed this method will return the fetched row or
null
if the row does not exist. If some modifications (updates or deletions) have already been done the row returned will be the result of the merge of the fetched row and of the pending mutations.- Parameters:
key
- the partition keyclustering
- the row clustering- Returns:
- the prefetched row with the already performed modifications
-
-