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, NO_DELETION_TIME, NO_TTL, serializer
column
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, withUpdatedValue
column, unsharedHeapSizeExcludingData
protected AbstractCell(ColumnDefinition column)
public boolean isCounterCell()
Cell
isCounterCell
in class Cell
public boolean isLive(int nowInSec)
Cell
public boolean isTombstone()
Cell
isTombstone
in class Cell
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
public Cell markCounterLocalToBeCleared()
markCounterLocalToBeCleared
in class Cell
public Cell purge(DeletionPurger purger, int nowInSec)
public Cell copy(AbstractAllocator allocator)
public Cell updateAllTimestamp(long newTimestamp)
ColumnData
newTimestamp
and
all deletion timestamp by newTimestamp - 1
.
This exists for the Paxos path, see PartitionUpdate.updateAllTimestamp(long)
for additional details.updateAllTimestamp
in class ColumnData
public int dataSize()
ColumnData
ColumnData
.dataSize
in class ColumnData
ColumnData
.public void digest(java.security.MessageDigest digest)
ColumnData
digest
in class ColumnData
digest
- the MessageDigest
to add the data to.public void validate()
ColumnData
validate
in class ColumnData
public long maxTimestamp()
maxTimestamp
in class ColumnData
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2016 The Apache Software Foundation