org.apache.cassandra.db

## Class DeletionTime

- java.lang.Object
- - org.apache.cassandra.db.DeletionTime

All Implemented Interfaces:
  java.lang.Comparable<DeletionTime>, IMeasurableMemory

    public class DeletionTime
    extends java.lang.Object
    implements java.lang.Comparable<DeletionTime>, IMeasurableMemory

A top-level (row) tombstone.

### Nested Class Summary

Nested Classes
`static class` `DeletionTime.Serializer`

### Field Summary

Fields
`static DeletionTime` `LIVE` A special DeletionTime that signifies that there is no top-level (row) tombstone.
`int` `localDeletionTime` The local server timestamp, in seconds since the unix epoch, at which this tombstone was created.
`long` `markedForDeleteAt` A timestamp (typically in microseconds since the unix epoch, although this is not enforced) after which data should be considered deleted.
`static DeletionTime.Serializer` `serializer`

### Constructor Summary

Constructors
Constructor and Description
`DeletionTime(long markedForDeleteAt, int localDeletionTime)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo(DeletionTime dt)`
`boolean` `equals(java.lang.Object o)`
`int` `hashCode()`
`boolean` `isDeleted(OnDiskAtom atom)`
`boolean` `isGcAble(int gcBefore)`
`boolean` `isLive()` Returns whether this DeletionTime is live, that is deletes no columns.
`boolean` `supersedes(DeletionTime dt)`
`java.lang.String` `toString()`
`long` `unsharedHeapSize()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### LIVE

    public static final DeletionTime LIVE

A special DeletionTime that signifies that there is no top-level (row) tombstone.

#### markedForDeleteAt

    public final 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 final int 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.

#### serializer

    public static final DeletionTime.Serializer serializer

### Constructor Detail

#### DeletionTime

    public DeletionTime(long markedForDeleteAt,
                        int localDeletionTime)

### Method Detail

#### isLive

    public boolean isLive()

Returns whether this DeletionTime is live, that is deletes no columns.

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public final int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### compareTo

    public int compareTo(DeletionTime dt)

Specified by:
  `compareTo` in interface `java.lang.Comparable<DeletionTime>`

#### isGcAble

    public boolean isGcAble(int gcBefore)

#### isDeleted

    public boolean isDeleted(OnDiskAtom atom)

#### supersedes

    public boolean supersedes(DeletionTime dt)

#### unsharedHeapSize

    public long unsharedHeapSize()

Specified by:
  `unsharedHeapSize` in interface `IMeasurableMemory`
Returns:
  the amount of on-heap memory retained by the object that might be reclaimed if the object were reclaimed, i.e. it should try to exclude globally cached data where possible, or counting portions of arrays that are referenced by the object but used by other objects only (e.g. slabbed byte-buffers), etc.