public abstract class AbstractCell extends Cell
Cell implementations.
Unless you have a very good reason not to, every cell implementation
should probably extend this class.comparator, MAX_DELETION_TIME, NO_DELETION_TIME, NO_TTL, serializercolumn| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCell(ColumnDefinition column) |
| Modifier and Type | Method and Description |
|---|---|
Cell |
copy(AbstractAllocator allocator) |
int |
dataSize()
The size of the data hold by this
ColumnData. |
void |
digest(java.security.MessageDigest digest)
Adds the data to the provided digest.
|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
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.
|
localDeletionTime, path, timestamp, ttl, value, withUpdatedColumn, withUpdatedTimestampAndLocalDeletionTime, withUpdatedValuecolumn, unsharedHeapSizeExcludingDataprotected AbstractCell(ColumnDefinition column)
public boolean isCounterCell()
CellisCounterCell in class Cellpublic boolean isLive(int nowInSec)
Cellpublic boolean isTombstone()
CellisTombstone in class Cellpublic 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 Cellpublic Cell markCounterLocalToBeCleared()
markCounterLocalToBeCleared in class Cellpublic 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(long) for additional details.updateAllTimestamp in class ColumnDatapublic int dataSize()
ColumnDataColumnData.dataSize in class ColumnDataColumnData.public void digest(java.security.MessageDigest digest)
ColumnDatadigest in class ColumnDatadigest - the MessageDigest to add the data to.public void validate()
ColumnDatavalidate 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 © 2018 The Apache Software Foundation