public class DeletionInfo
extends java.lang.Object
ColumnFamily
(or row).Modifier and Type | Class and Description |
---|---|
class |
DeletionInfo.InOrderTester
This object allow testing whether a given column (name/timestamp) is deleted
or not by this DeletionInfo, assuming that the columns given to this
object are passed in forward or reversed comparator sorted order.
|
static class |
DeletionInfo.Serializer |
Constructor and Description |
---|
DeletionInfo(java.nio.ByteBuffer start,
java.nio.ByteBuffer end,
java.util.Comparator<java.nio.ByteBuffer> comparator,
long markedForDeleteAt,
int localDeletionTime) |
DeletionInfo(DeletionTime topLevel) |
DeletionInfo(long markedForDeleteAt,
int localDeletionTime)
Creates a DeletionInfo with only a top-level (row) tombstone.
|
DeletionInfo(RangeTombstone rangeTombstone,
java.util.Comparator<java.nio.ByteBuffer> comparator) |
Modifier and Type | Method and Description |
---|---|
DeletionInfo |
add(DeletionInfo newInfo)
Combines another DeletionInfo with this one and returns the result.
|
void |
add(DeletionTime newInfo)
Potentially replaces the top-level tombstone with another, keeping whichever has the higher markedForDeleteAt
timestamp.
|
void |
add(RangeTombstone tombstone,
java.util.Comparator<java.nio.ByteBuffer> comparator) |
DeletionInfo |
copy() |
int |
dataSize() |
boolean |
equals(java.lang.Object o) |
DeletionTime |
getTopLevelDeletion()
Returns the top-level (or "row") tombstone.
|
int |
hashCode() |
boolean |
hasPurgeableTombstones(int gcBefore)
Returns true if
purge would remove the top-level tombstone or any of the range
tombstones, false otherwise. |
boolean |
hasRanges() |
DeletionInfo.InOrderTester |
inOrderTester(boolean reversed)
Returns a new
DeletionInfo.InOrderTester given the order in which
columns will be passed to it. |
boolean |
isDeleted(java.nio.ByteBuffer name,
long timestamp) |
boolean |
isDeleted(Column column)
Return whether a given column is deleted by the container having this deletion info.
|
boolean |
isLive()
Returns whether this DeletionInfo is live, that is deletes no columns.
|
static DeletionInfo |
live()
Returns a new DeletionInfo that has no top-level tombstone or any range tombstones.
|
long |
maxTimestamp()
Returns the maximum timestamp in any of the range tombstones or the top-level tombstone.
|
long |
minTimestamp()
Returns the minimum timestamp in any of the range tombstones or the top-level tombstone.
|
void |
purge(int gcBefore)
Purge every tombstones that are older than
gcbefore . |
DeletionTime |
rangeCovering(java.nio.ByteBuffer name) |
java.util.Iterator<RangeTombstone> |
rangeIterator() |
static DeletionInfo.Serializer |
serializer() |
java.lang.String |
toString() |
void |
updateAllTimestamp(long timestamp) |
public DeletionInfo(long markedForDeleteAt, int localDeletionTime)
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).public DeletionInfo(DeletionTime topLevel)
public DeletionInfo(java.nio.ByteBuffer start, java.nio.ByteBuffer end, java.util.Comparator<java.nio.ByteBuffer> comparator, long markedForDeleteAt, int localDeletionTime)
public DeletionInfo(RangeTombstone rangeTombstone, java.util.Comparator<java.nio.ByteBuffer> comparator)
public static DeletionInfo live()
public static DeletionInfo.Serializer serializer()
public DeletionInfo copy()
public boolean isLive()
public boolean isDeleted(Column column)
column
- the column to check.public boolean isDeleted(java.nio.ByteBuffer name, long timestamp)
public DeletionInfo.InOrderTester inOrderTester(boolean reversed)
DeletionInfo.InOrderTester
given the order in which
columns will be passed to it.public void purge(int gcBefore)
gcbefore
.gcBefore
- timestamp (in seconds) before which tombstones should be purgedpublic boolean hasPurgeableTombstones(int gcBefore)
purge
would remove the top-level tombstone or any of the range
tombstones, false otherwise.gcBefore
- timestamp (in seconds) before which tombstones should be purgedpublic void add(DeletionTime newInfo)
newInfo
- public void add(RangeTombstone tombstone, java.util.Comparator<java.nio.ByteBuffer> comparator)
public DeletionInfo add(DeletionInfo newInfo)
public long minTimestamp()
public long maxTimestamp()
public DeletionTime getTopLevelDeletion()
public java.util.Iterator<RangeTombstone> rangeIterator()
public DeletionTime rangeCovering(java.nio.ByteBuffer name)
public int dataSize()
public boolean hasRanges()
public java.lang.String toString()
toString
in class java.lang.Object
public void updateAllTimestamp(long timestamp)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
Copyright © 2014 The Apache Software Foundation