public abstract class AbstractCell<V> extends Cell<V>
Cell implementations.
Unless you have a very good reason not to, every cell implementation
should probably extend this class.Cell.Factory<V>comparator, MAX_DELETION_TIME, NO_DELETION_TIME, NO_TTL, serializercolumn| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCell(ColumnMetadata column) |
| Modifier and Type | Method and Description |
|---|---|
Cell<?> |
copy(AbstractAllocator allocator) |
int |
dataSize()
The size of the data hold by this
ColumnData. |
void |
digest(Digest digest)
Adds the data to the provided digest.
|
static <V1,V2> boolean |
equals(Cell<V1> left,
Cell<V2> right) |
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
boolean |
hasInvalidDeletions()
Validates the deletions (ttl and local deletion time) if any.
|
boolean |
isCounterCell()
Whether the cell is a counter cell or not.
|
boolean |
isExpiring()
Whether the cell is an expiring one or not.
|
boolean |
isLive(int nowInSec)
Whether the cell is live or not given the current time.
|
boolean |
isTombstone()
Whether the cell is a tombstone or not.
|
Cell<?> |
markCounterLocalToBeCleared() |
long |
maxTimestamp() |
Cell<?> |
purge(DeletionPurger purger,
int nowInSec) |
java.lang.String |
toString() |
Cell<?> |
updateAllTimestamp(long newTimestamp)
Returns a copy of the data where all timestamps for live data have replaced by
newTimestamp and
all deletion timestamp by newTimestamp - 1. |
void |
validate()
Validate the column data.
|
accessor, buffer, localDeletionTime, path, timestamp, ttl, value, valueSize, withUpdatedColumn, withUpdatedTimestampAndLocalDeletionTime, withUpdatedValuecolumn, digest, unsharedHeapSizeExcludingDataprotected AbstractCell(ColumnMetadata column)
public boolean isCounterCell()
CellisCounterCell in class Cell<V>public boolean isLive(int nowInSec)
Cellpublic boolean isTombstone()
CellisTombstone in class Cell<V>public boolean isExpiring()
Cell
Note that this only correspond to whether the cell liveness info
have a TTL or not, but doesn't tells whether the cell is already expired
or not. You should use Cell.isLive(int) for that latter information.
isExpiring in class Cell<V>public Cell<?> markCounterLocalToBeCleared()
markCounterLocalToBeCleared in class Cell<V>public Cell<?> purge(DeletionPurger purger, int nowInSec)
public Cell<?> copy(AbstractAllocator allocator)
public Cell<?> updateAllTimestamp(long newTimestamp)
ColumnDatanewTimestamp and
all deletion timestamp by newTimestamp - 1.
This exists for the Paxos path, see PartitionUpdate#updateAllTimestamp for additional details.updateAllTimestamp in class ColumnDatapublic int dataSize()
ColumnDataColumnData.dataSize in class ColumnDataColumnData.public void digest(Digest digest)
ColumnDatadigest in class ColumnDatadigest - the Digest to add the data to.public void validate()
ColumnDatavalidate in class ColumnDatapublic boolean hasInvalidDeletions()
ColumnDatahasInvalidDeletions in class ColumnDatapublic long maxTimestamp()
maxTimestamp in class ColumnDatapublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2009-2020 The Apache Software Foundation