Package org.apache.cassandra.db.rows
Class BufferCell
- All Implemented Interfaces:
IMeasurableMemory
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.db.rows.Cell
Cell.Factory<V>Nested classes/interfaces inherited from class org.apache.cassandra.db.rows.ColumnData
ColumnData.PostReconciliationFunction, ColumnData.Reconciler -
Field Summary
Fields inherited from class org.apache.cassandra.db.rows.Cell
comparator, INVALID_DELETION_TIME, MAX_DELETION_TIME, MAX_DELETION_TIME_2038_LEGACY_CAP, MAX_DELETION_TIME_UNSIGNED_INTEGER, NO_DELETION_TIME, NO_DELETION_TIME_UNSIGNED_INTEGER, NO_TTL, serializerFields inherited from class org.apache.cassandra.db.rows.ColumnData
column, noOp -
Constructor Summary
ConstructorsConstructorDescriptionBufferCell(ColumnMetadata column, long timestamp, int ttl, int localDeletionTimeUnsignedInteger, ByteBuffer value, CellPath path) BufferCell(ColumnMetadata column, long timestamp, int ttl, long localDeletionTime, ByteBuffer value, CellPath path) -
Method Summary
Modifier and TypeMethodDescriptionaccessor()Cell<?>clone(ByteBufferCloner cloner) static BufferCellexpiring(ColumnMetadata column, long timestamp, int ttl, long nowInSec, ByteBuffer value) static BufferCellexpiring(ColumnMetadata column, long timestamp, int ttl, long nowInSec, ByteBuffer value, CellPath path) static BufferCelllive(ColumnMetadata column, long timestamp, ByteBuffer value) static BufferCelllive(ColumnMetadata column, long timestamp, ByteBuffer value, CellPath path) protected intpath()For cells belonging to complex types (non-frozen collection and UDT), the path to the cell.longThe cell timestamp.static BufferCelltombstone(ColumnMetadata column, long timestamp, long nowInSec) static BufferCelltombstone(ColumnMetadata column, long timestamp, long nowInSec, CellPath path) intttl()The cell ttl.longlongvalue()Cell<?>Used to apply the same optimization as inCell.Serializer.deserialize(org.apache.cassandra.io.util.DataInputPlus, org.apache.cassandra.db.LivenessInfo, org.apache.cassandra.schema.ColumnMetadata, org.apache.cassandra.db.SerializationHeader, org.apache.cassandra.db.rows.DeserializationHelper, org.apache.cassandra.db.marshal.ValueAccessor<V>)when the column is not queried but eventhough it's used for digest calculation.Cell<?>withUpdatedColumn(ColumnMetadata newColumn) Cell<?>withUpdatedTimestampAndLocalDeletionTime(long newTimestamp, long newLocalDeletionTime) Cell<?>withUpdatedValue(ByteBuffer newValue) Methods inherited from class org.apache.cassandra.db.rows.AbstractCell
dataSize, digest, equals, equals, hashCode, hasInvalidDeletions, isCounterCell, isExpiring, isLive, isTombstone, markCounterLocalToBeCleared, maxTimestamp, purge, purgeDataOlderThan, toString, updateAllTimestamp, validateMethods inherited from class org.apache.cassandra.db.rows.Cell
buffer, clone, decodeLocalDeletionTime, deletionTimeLongToUnsignedInteger, deletionTimeUnsignedIntegerToLong, getVersionedMaxDeletiontionTime, localDeletionTime, valueSizeMethods inherited from class org.apache.cassandra.db.rows.ColumnData
column, digest, reconciler
-
Constructor Details
-
BufferCell
public BufferCell(ColumnMetadata column, long timestamp, int ttl, long localDeletionTime, ByteBuffer value, CellPath path) -
BufferCell
public BufferCell(ColumnMetadata column, long timestamp, int ttl, int localDeletionTimeUnsignedInteger, ByteBuffer value, CellPath path)
-
-
Method Details
-
live
-
live
public static BufferCell live(ColumnMetadata column, long timestamp, ByteBuffer value, CellPath path) -
expiring
public static BufferCell expiring(ColumnMetadata column, long timestamp, int ttl, long nowInSec, ByteBuffer value) -
expiring
public static BufferCell expiring(ColumnMetadata column, long timestamp, int ttl, long nowInSec, ByteBuffer value, CellPath path) -
tombstone
-
tombstone
public static BufferCell tombstone(ColumnMetadata column, long timestamp, long nowInSec, CellPath path) -
timestamp
public long timestamp()Description copied from class:CellThe cell timestamp.- Specified by:
timestampin classCell<ByteBuffer>- Returns:
- the cell timestamp.
-
ttl
public int ttl()Description copied from class:CellThe cell ttl.- Specified by:
ttlin classCell<ByteBuffer>- Returns:
- the cell ttl, or
NO_TTLif the cell isn't an expiring one.
-
value
- Specified by:
valuein classCell<ByteBuffer>
-
accessor
- Specified by:
accessorin classCell<ByteBuffer>
-
path
Description copied from class:CellFor cells belonging to complex types (non-frozen collection and UDT), the path to the cell.- Specified by:
pathin classCell<ByteBuffer>- Returns:
- the cell path for cells of complex column, and
nullfor other cells.
-
withUpdatedColumn
- Specified by:
withUpdatedColumnin classCell<ByteBuffer>
-
withUpdatedValue
- Specified by:
withUpdatedValuein classCell<ByteBuffer>
-
withUpdatedTimestampAndLocalDeletionTime
public Cell<?> withUpdatedTimestampAndLocalDeletionTime(long newTimestamp, long newLocalDeletionTime) - Specified by:
withUpdatedTimestampAndLocalDeletionTimein classCell<ByteBuffer>
-
withSkippedValue
Description copied from class:CellUsed to apply the same optimization as inCell.Serializer.deserialize(org.apache.cassandra.io.util.DataInputPlus, org.apache.cassandra.db.LivenessInfo, org.apache.cassandra.schema.ColumnMetadata, org.apache.cassandra.db.SerializationHeader, org.apache.cassandra.db.rows.DeserializationHelper, org.apache.cassandra.db.marshal.ValueAccessor<V>)when the column is not queried but eventhough it's used for digest calculation.- Specified by:
withSkippedValuein classCell<ByteBuffer>- Returns:
- a cell with an empty buffer as value
-
clone
- Overrides:
clonein classAbstractCell<ByteBuffer>
-
localDeletionTimeAsUnsignedInt
protected int localDeletionTimeAsUnsignedInt()- Specified by:
localDeletionTimeAsUnsignedIntin classCell<ByteBuffer>
-