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>
ColumnData.PostReconciliationFunction, ColumnData.Reconciler
comparator, MAX_DELETION_TIME, NO_DELETION_TIME, NO_TTL, serializer
column, noOp
Modifier | Constructor and Description |
---|---|
protected |
AbstractCell(ColumnMetadata column) |
Modifier and Type | Method and Description |
---|---|
Cell<?> |
clone(ByteBufferCloner cloner) |
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) |
Cell<?> |
purgeDataOlderThan(long timestamp) |
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, clone, localDeletionTime, path, timestamp, ttl, value, valueSize, withSkippedValue, withUpdatedColumn, withUpdatedTimestampAndLocalDeletionTime, withUpdatedValue
column, digest, reconciler, unsharedHeapSize, unsharedHeapSizeExcludingData
protected AbstractCell(ColumnMetadata column)
public boolean isCounterCell()
Cell
isCounterCell
in class Cell<V>
public boolean isLive(int nowInSec)
Cell
public boolean isTombstone()
Cell
isTombstone
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<?> purgeDataOlderThan(long timestamp)
purgeDataOlderThan
in class Cell<V>
public Cell<?> clone(ByteBufferCloner cloner)
public Cell<?> updateAllTimestamp(long newTimestamp)
ColumnData
newTimestamp
and
all deletion timestamp by newTimestamp - 1
.
This exists for the Paxos path, see PartitionUpdate#updateAllTimestamp
for additional details.updateAllTimestamp
in class ColumnData
public int dataSize()
ColumnData
ColumnData
.dataSize
in class ColumnData
ColumnData
.public void digest(Digest digest)
ColumnData
digest
in class ColumnData
digest
- the Digest
to add the data to.public void validate()
ColumnData
validate
in class ColumnData
public boolean hasInvalidDeletions()
ColumnData
hasInvalidDeletions
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 © 2009-2022 The Apache Software Foundation