Package org.apache.cassandra.db
Class MutableDeletionInfo
java.lang.Object
org.apache.cassandra.db.MutableDeletionInfo
- All Implemented Interfaces:
IMeasurableMemory,DeletionInfo
A mutable implementation of
DeletionInfo.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilds DeletionInfo object from (in order) range tombstone markers. -
Field Summary
Fields inherited from interface org.apache.cassandra.db.DeletionInfo
LIVE -
Constructor Summary
ConstructorsConstructorDescriptionMutableDeletionInfo(long markedForDeleteAt, long localDeletionTime) Creates a DeletionInfo with only a top-level (row) tombstone.MutableDeletionInfo(DeletionTime partitionDeletion) MutableDeletionInfo(DeletionTime partitionDeletion, RangeTombstoneList ranges) -
Method Summary
Modifier and TypeMethodDescriptionadd(DeletionInfo newInfo) Combines another DeletionInfo with this one and returns the result.voidadd(DeletionTime newInfo) Potentially replaces the top-level tombstone with another, keeping whichever has the higher markedForDeleteAt timestamp.voidadd(RangeTombstone tombstone, ClusteringComparator comparator) static MutableDeletionInfo.Builderbuilder(DeletionTime partitionLevelDeletion, ClusteringComparator comparator, boolean reversed) clone(ByteBufferCloner cloner) voidcollectStats(EncodingStats.Collector collector) intdataSize()booleanfinal inthashCode()booleanbooleanisLive()Returns whether this DeletionInfo is live, that is deletes no columns.static MutableDeletionInfolive()Returns a new DeletionInfo that has no top-level tombstone or any range tombstones.longbooleanmayModify(DeletionInfo delInfo) Whether this deletion info may modify the provided one if added to it.intrangeCovering(Clustering<?> name) rangeIterator(boolean reversed) rangeIterator(Slice slice, boolean reversed) toString()longupdateAllTimestamp(long timestamp)
-
Constructor Details
-
MutableDeletionInfo
public MutableDeletionInfo(long markedForDeleteAt, long localDeletionTime) Creates a DeletionInfo with only a top-level (row) tombstone.- Parameters:
markedForDeleteAt- the time after which the entire row should be considered deletedlocalDeletionTime- what time the deletion write was applied locally (for purposes of purging the tombstone after gc_grace_seconds).
-
MutableDeletionInfo
-
MutableDeletionInfo
-
-
Method Details
-
live
Returns a new DeletionInfo that has no top-level tombstone or any range tombstones. -
mutableCopy
- Specified by:
mutableCopyin interfaceDeletionInfo
-
clone
- Specified by:
clonein interfaceDeletionInfo
-
isLive
public boolean isLive()Returns whether this DeletionInfo is live, that is deletes no columns.- Specified by:
isLivein interfaceDeletionInfo
-
add
Potentially replaces the top-level tombstone with another, keeping whichever has the higher markedForDeleteAt timestamp.- Parameters:
newInfo- the deletion time to add to this deletion info.
-
add
-
add
Combines another DeletionInfo with this one and returns the result. Whichever top-level tombstone has the higher markedForDeleteAt timestamp will be kept, along with its localDeletionTime. The range tombstones will be combined.- Returns:
- this object.
-
getPartitionDeletion
- Specified by:
getPartitionDeletionin interfaceDeletionInfo
-
rangeIterator
- Specified by:
rangeIteratorin interfaceDeletionInfo
-
rangeIterator
- Specified by:
rangeIteratorin interfaceDeletionInfo
-
rangeCovering
- Specified by:
rangeCoveringin interfaceDeletionInfo
-
dataSize
public int dataSize()- Specified by:
dataSizein interfaceDeletionInfo
-
hasRanges
public boolean hasRanges()- Specified by:
hasRangesin interfaceDeletionInfo
-
rangeCount
public int rangeCount()- Specified by:
rangeCountin interfaceDeletionInfo
-
maxTimestamp
public long maxTimestamp()- Specified by:
maxTimestampin interfaceDeletionInfo
-
mayModify
Whether this deletion info may modify the provided one if added to it.- Specified by:
mayModifyin interfaceDeletionInfo
-
toString
-
updateAllTimestamp
-
equals
-
hashCode
public final int hashCode() -
collectStats
- Specified by:
collectStatsin interfaceDeletionInfo
-
builder
public static MutableDeletionInfo.Builder builder(DeletionTime partitionLevelDeletion, ClusteringComparator comparator, boolean reversed)
-