public class BufferCell extends AbstractCell
comparator, NO_DELETION_TIME, NO_TTL, serializercolumn| Constructor and Description |
|---|
BufferCell(ColumnDefinition column,
long timestamp,
int ttl,
int localDeletionTime,
java.nio.ByteBuffer value,
CellPath path) |
| Modifier and Type | Method and Description |
|---|---|
Cell |
copy(AbstractAllocator allocator) |
int |
dataSize()
The size of the data hold by this
ColumnData. |
static BufferCell |
expiring(ColumnDefinition column,
long timestamp,
int ttl,
int nowInSec,
java.nio.ByteBuffer value) |
static BufferCell |
expiring(ColumnDefinition column,
long timestamp,
int ttl,
int nowInSec,
java.nio.ByteBuffer value,
CellPath path) |
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.
|
static BufferCell |
live(CFMetaData metadata,
ColumnDefinition column,
long timestamp,
java.nio.ByteBuffer value) |
static BufferCell |
live(CFMetaData metadata,
ColumnDefinition column,
long timestamp,
java.nio.ByteBuffer value,
CellPath path) |
int |
localDeletionTime()
The cell local deletion time.
|
Cell |
markCounterLocalToBeCleared() |
CellPath |
path()
For cells belonging to complex types (non-frozen collection and UDT), the
path to the cell.
|
Cell |
purge(DeletionPurger purger,
int nowInSec) |
long |
timestamp()
The cell timestamp.
|
static BufferCell |
tombstone(ColumnDefinition column,
long timestamp,
int nowInSec) |
static BufferCell |
tombstone(ColumnDefinition column,
long timestamp,
int nowInSec,
CellPath path) |
int |
ttl()
The cell ttl.
|
long |
unsharedHeapSizeExcludingData() |
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. |
java.nio.ByteBuffer |
value()
The cell value.
|
Cell |
withUpdatedValue(java.nio.ByteBuffer newValue) |
digest, equals, hashCode, toString, validatecolumnpublic BufferCell(ColumnDefinition column, long timestamp, int ttl, int localDeletionTime, java.nio.ByteBuffer value, CellPath path)
public static BufferCell live(CFMetaData metadata, ColumnDefinition column, long timestamp, java.nio.ByteBuffer value)
public static BufferCell live(CFMetaData metadata, ColumnDefinition column, long timestamp, java.nio.ByteBuffer value, CellPath path)
public static BufferCell expiring(ColumnDefinition column, long timestamp, int ttl, int nowInSec, java.nio.ByteBuffer value)
public static BufferCell expiring(ColumnDefinition column, long timestamp, int ttl, int nowInSec, java.nio.ByteBuffer value, CellPath path)
public static BufferCell tombstone(ColumnDefinition column, long timestamp, int nowInSec)
public static BufferCell tombstone(ColumnDefinition column, long timestamp, int nowInSec, CellPath path)
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 long timestamp()
Cellpublic int ttl()
Cellpublic int localDeletionTime()
CelllocalDeletionTime in class CellNO_DELETION_TIME if the cell is neither
a tombstone nor an expiring one.public java.nio.ByteBuffer value()
Cellpublic CellPath path()
Cellpublic Cell withUpdatedValue(java.nio.ByteBuffer newValue)
withUpdatedValue in class Cellpublic Cell copy(AbstractAllocator allocator)
public Cell markCounterLocalToBeCleared()
markCounterLocalToBeCleared in class Cellpublic Cell purge(DeletionPurger purger, int nowInSec)
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 long unsharedHeapSizeExcludingData()
unsharedHeapSizeExcludingData in class ColumnDataCopyright © 2016 The Apache Software Foundation