Package org.apache.cassandra.db.rows
Class ComplexColumnData
java.lang.Object
org.apache.cassandra.db.rows.ColumnData
org.apache.cassandra.db.rows.ComplexColumnData
- All Implemented Interfaces:
Iterable<Cell<?>>,IMeasurableMemory
The data for a complex column, that is it's cells and potential complex
deletion time.
-
Nested Class Summary
Nested ClassesNested 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.ColumnData
column, comparator, noOp -
Method Summary
Modifier and TypeMethodDescription<A> longaccumulate(BiLongAccumulator<A, Cell<?>> accumulator, A arg, long initialValue) longaccumulate(LongAccumulator<Cell<?>> accumulator, long initialValue) static ComplexColumnData.Builderbuilder()intThe complex deletion time of the complex column.intdataSize()The size of the data hold by thisColumnData.voidAdds the data to the provided digest.booleanfilter(ColumnFilter filter, DeletionTime activeDeletion, DroppedColumn dropped, LivenessInfo rowLiveness) Cell<?>Cell<?>getCellByIndex(int idx) inthashCode()booleanValidates the deletions (ttl and local deletion time) if any.iterator()longpurge(DeletionPurger purger, long nowInSec) purgeDataOlderThan(long timestamp) toString()transformAndFilter(com.google.common.base.Function<? super Cell<?>, ? extends Cell<?>> function) transformAndFilter(DeletionTime newDeletion, com.google.common.base.Function<? super Cell, ? extends Cell> function) static ComplexColumnDataunsafeConstruct(ColumnMetadata column, Object[] cells, DeletionTime complexDeletion) 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.withOnlyQueriedData(ColumnFilter filter) Methods inherited from class org.apache.cassandra.db.rows.ColumnData
column, digest, reconcilerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
cellsCount
public int cellsCount() -
getCell
-
getCellByIndex
-
complexDeletion
The complex deletion time of the complex column.The returned "complex deletion" is a deletion of all the cells of the column. For instance, for a collection, this correspond to a full collection deletion. Please note that this deletion says nothing about the individual cells of the complex column: there can be no complex deletion but some of the individual cells can be deleted.
- Returns:
- the complex deletion time for the column this is the data of or
DeletionTime.LIVEif the column is not deleted.
-
iterator
-
searchIterator
-
reverseIterator
-
accumulate
-
accumulate
-
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
-
digest
Description copied from class:ColumnDataAdds the data to the provided digest.- Specified by:
digestin classColumnData- Parameters:
digest- theDigestto add the data to.
-
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
-
markCounterLocalToBeCleared
- Specified by:
markCounterLocalToBeClearedin classColumnData
-
filter
public ComplexColumnData filter(ColumnFilter filter, DeletionTime activeDeletion, DroppedColumn dropped, LivenessInfo rowLiveness) -
purge
- Specified by:
purgein classColumnData
-
withOnlyQueriedData
-
purgeDataOlderThan
- Specified by:
purgeDataOlderThanin classColumnData
-
transformAndFilter
public ComplexColumnData transformAndFilter(com.google.common.base.Function<? super Cell<?>, ? extends Cell<?>> function) -
transformAndFilter
public ComplexColumnData transformAndFilter(DeletionTime newDeletion, com.google.common.base.Function<? super Cell, ? extends Cell> function) -
transform
public <V> ComplexColumnData transform(com.google.common.base.Function<? super Cell<?>, ? extends Cell<?>> function) -
clone
- Specified by:
clonein classColumnData
-
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
-
maxTimestamp
public long maxTimestamp()- Specified by:
maxTimestampin classColumnData
-
equals
-
hashCode
public int hashCode() -
toString
-
unsafeConstruct
public static ComplexColumnData unsafeConstruct(ColumnMetadata column, Object[] cells, DeletionTime complexDeletion) -
builder
-