Package org.apache.cassandra.db
Class DeletionTime
java.lang.Object
org.apache.cassandra.db.DeletionTime
- All Implemented Interfaces:
Comparable<DeletionTime>,IMeasurableMemory
- Direct Known Subclasses:
DeletionTime.InvalidDeletionTime
Information on deletion of a storage engine object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final DeletionTimeA special DeletionTime that signifies that there is no top-level (row) tombstone. -
Method Summary
Modifier and TypeMethodDescriptionstatic DeletionTimebuild(long markedForDeleteAt, long localDeletionTime) intintdataSize()booleandeletes(long timestamp) booleandeletes(LivenessInfo info) booleanvoidbooleanstatic DeletionTime.SerializergetSerializer(Version version) final inthashCode()booleanisLive()Returns whether this DeletionTime is live, that is deletes no columns.longThe local server timestamp, in seconds since the unix epoch, at which this tombstone was created.longA timestamp (typically in microseconds since the unix epoch, although this is not enforced) after which data should be considered deleted.booleantoString()longbooleanvalidate()Check if this deletion time is valid.
-
Field Details
-
EMPTY_SIZE
public static final long EMPTY_SIZE -
LIVE
A special DeletionTime that signifies that there is no top-level (row) tombstone.
-
-
Method Details
-
build
-
markedForDeleteAt
public long markedForDeleteAt()A timestamp (typically in microseconds since the unix epoch, although this is not enforced) after which data should be considered deleted. If set to Long.MIN_VALUE, this implies that the data has not been marked for deletion at all. -
localDeletionTime
public long localDeletionTime()The local server timestamp, in seconds since the unix epoch, at which this tombstone was created. This is only used for purposes of purging the tombstone after gc_grace_seconds have elapsed. -
isLive
public boolean isLive()Returns whether this DeletionTime is live, that is deletes no columns. -
digest
-
validate
public boolean validate()Check if this deletion time is valid. This is always true, because - as we permit negative timestamps, markedForDeleteAt can be negative. - localDeletionTime is stored as an unsigned int and cannot be negative.- Returns:
- true if it is valid
-
equals
-
hashCode
public final int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<DeletionTime>
-
supersedes
-
deletes
-
deletes
-
deletes
public boolean deletes(long timestamp) -
dataSize
public int dataSize() -
getSerializer
-