public class DeletionInfo extends java.lang.Object implements IMeasurableMemory
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(Composite start,
Composite end,
java.util.Comparator<Composite> 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<Composite> 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<Composite> comparator) |
DeletionInfo |
copy() |
DeletionInfo |
copy(AbstractAllocator allocator) |
int |
dataSize() |
DeletionInfo |
diff(DeletionInfo superset)
Evaluates difference between this deletion info and superset for read repair
|
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(Cell cell)
Return whether a given cell 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.
|
boolean |
mayModify(DeletionInfo delInfo)
Whether this deletion info may modify the provided one if added to it.
|
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 . |
int |
rangeCount() |
RangeTombstone |
rangeCovering(Composite name) |
java.util.Iterator<RangeTombstone> |
rangeIterator() |
java.util.Iterator<RangeTombstone> |
rangeIterator(Composite start,
Composite finish) |
java.lang.String |
toString() |
long |
unsharedHeapSize() |
void |
updateAllTimestamp(long timestamp) |
void |
updateDigest(java.security.MessageDigest digest)
Digests deletion info.
|
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(Composite start, Composite end, java.util.Comparator<Composite> comparator, long markedForDeleteAt, int localDeletionTime)
public DeletionInfo(RangeTombstone rangeTombstone, java.util.Comparator<Composite> comparator)
public static DeletionInfo live()
public DeletionInfo copy()
public DeletionInfo copy(AbstractAllocator allocator)
public boolean isLive()
public boolean isDeleted(Cell cell)
cell
- the cell to check.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 DeletionInfo diff(DeletionInfo superset)
public void updateDigest(java.security.MessageDigest digest)
public 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<Composite> comparator)
public DeletionInfo add(DeletionInfo newInfo)
public long minTimestamp()
public long maxTimestamp()
public DeletionTime getTopLevelDeletion()
public java.util.Iterator<RangeTombstone> rangeIterator()
public java.util.Iterator<RangeTombstone> rangeIterator(Composite start, Composite finish)
public RangeTombstone rangeCovering(Composite name)
public int dataSize()
public boolean hasRanges()
public int rangeCount()
public boolean mayModify(DeletionInfo delInfo)
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
public long unsharedHeapSize()
unsharedHeapSize
in interface IMeasurableMemory
Copyright © 2017 The Apache Software Foundation