Class CellWithSource<T>
java.lang.Object
org.apache.cassandra.db.rows.ColumnData
org.apache.cassandra.db.rows.Cell<T>
org.apache.cassandra.index.sai.utils.CellWithSource<T>
- Type Parameters:
T- the type of the cell's value
- All Implemented Interfaces:
IMeasurableMemory
A wrapped
Cell that includes a reference to the cell's source table via CellSourceIdentifier-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessor()Cell<?>clone(ByteBufferCloner cloner) intdataSize()The size of the data hold by thisColumnData.voidAdds the data to the provided digest.booleanValidates the deletions (ttl and local deletion time) if any.booleanWhether the cell is a counter cell or not.CassandraUIntbooleanWhether the cell is an expiring one or not.booleanisLive(long nowInSec) Whether the cell is live or not given the current time.booleanWhether the cell is a tombstone or not.longThe cell local deletion time.protected intCell<?>longpath()For cells belonging to complex types (non-frozen collection and UDT), the path to the cell.Cell<?>purge(DeletionPurger purger, long nowInSec) Cell<?>purgeDataOlderThan(long timestamp) longThe cell timestamp.intttl()The cell ttl.longlongupdateAllTimestamp(long newTimestamp) Returns a copy of the data where all timestamps for live data have replaced bynewTimestampand all deletion timestamp bynewTimestamp - 1.voidvalidate()Validate the column data.value()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.Cell
buffer, clone, decodeLocalDeletionTime, deletionTimeLongToUnsignedInteger, deletionTimeUnsignedIntegerToLong, getVersionedMaxDeletiontionTime, valueSizeMethods inherited from class org.apache.cassandra.db.rows.ColumnData
column, digest, reconciler
-
Constructor Details
-
CellWithSource
-
-
Method Details
-
sourceTable
-
isCounterCell
public boolean isCounterCell()Description copied from class:CellWhether the cell is a counter cell or not.CassandraUInt- Specified by:
isCounterCellin classCell<T>- Returns:
- whether the cell is a counter cell or not.
-
value
-
accessor
-
timestamp
public long timestamp()Description copied from class:CellThe cell timestamp. -
ttl
public int ttl()Description copied from class:CellThe cell ttl. -
localDeletionTime
public long localDeletionTime()Description copied from class:CellThe cell local deletion time.- Overrides:
localDeletionTimein classCell<T>- Returns:
- the cell local deletion time, or
NO_DELETION_TIMEif the cell is neither a tombstone nor an expiring one.
-
isTombstone
public boolean isTombstone()Description copied from class:CellWhether the cell is a tombstone or not.- Specified by:
isTombstonein classCell<T>- Returns:
- whether the cell is a tombstone or not.
-
isExpiring
public boolean isExpiring()Description copied from class:CellWhether the cell is an expiring one or not.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(long)for that latter information.- Specified by:
isExpiringin classCell<T>- Returns:
- whether the cell is an expiring one or not.
-
isLive
public boolean isLive(long nowInSec) Description copied from class:CellWhether the cell is live or not given the current time. -
path
Description copied from class:CellFor cells belonging to complex types (non-frozen collection and UDT), the path to the cell. -
withUpdatedColumn
- Specified by:
withUpdatedColumnin classCell<T>
-
withUpdatedValue
- Specified by:
withUpdatedValuein classCell<T>
-
withUpdatedTimestampAndLocalDeletionTime
public Cell<?> withUpdatedTimestampAndLocalDeletionTime(long newTimestamp, long newLocalDeletionTime) - Specified by:
withUpdatedTimestampAndLocalDeletionTimein classCell<T>
-
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<T>- Returns:
- a cell with an empty buffer as value
-
clone
-
dataSize
public int dataSize()Description copied from class:ColumnDataThe size of the data hold by thisColumnData.- Specified by:
dataSizein classColumnData- Returns:
- the size used by the data of this
ColumnData.
-
validate
public void validate()Description copied from class:ColumnDataValidate the column data.- Specified by:
validatein classColumnData
-
hasInvalidDeletions
public boolean hasInvalidDeletions()Description copied from class:ColumnDataValidates the deletions (ttl and local deletion time) if any.- Specified by:
hasInvalidDeletionsin classColumnData- Returns:
- true if it has any invalid deletions, false otherwise
-
digest
Description copied from class:ColumnDataAdds the data to the provided digest.- Specified by:
digestin classColumnData- Parameters:
digest- theDigestto add the data to.
-
updateAllTimestamp
Description copied from class:ColumnDataReturns a copy of the data where all timestamps for live data have replaced bynewTimestampand all deletion timestamp bynewTimestamp - 1. This exists for the Paxos path, seePartitionUpdate#updateAllTimestampfor additional details.- Specified by:
updateAllTimestampin classColumnData
-
markCounterLocalToBeCleared
- Specified by:
markCounterLocalToBeClearedin classCell<T>
-
purge
-
purgeDataOlderThan
- Specified by:
purgeDataOlderThanin classCell<T>
-
localDeletionTimeAsUnsignedInt
protected int localDeletionTimeAsUnsignedInt()- Specified by:
localDeletionTimeAsUnsignedIntin classCell<T>
-
maxTimestamp
public long maxTimestamp()- Specified by:
maxTimestampin classColumnData
-