Class AtomicBTreePartition
java.lang.Object
org.apache.cassandra.db.partitions.AbstractBTreePartition
org.apache.cassandra.db.partitions.AtomicBTreePartition
A thread-safe and atomic Partition implementation.
Operations (in particular addAll) on this implementation are atomic and
isolated (in the sense of ACID). Typically a addAll is guaranteed that no
other thread can see the state where only parts but not all rows have
been added.
-
Field Summary
FieldsFields inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition
partitionKey -
Constructor Summary
ConstructorsConstructorDescriptionAtomicBTreePartition(TableMetadataRef metadata, DecoratedKey partitionKey, MemtableAllocator allocator) -
Method Summary
Modifier and TypeMethodDescriptionaddAll(PartitionUpdate update, Cloner cloner, OpOrder.Group writeOp, UpdateTransaction indexer) Adds a given update to this in-memtable partition.protected booleangetRow(Clustering<?> clustering) Returns the row corresponding to the provided clustering, or null if there is not such row.protected BTreePartitionDataholder()iterator()lastRow()metadata()unfilteredIterator(BTreePartitionData current, ColumnFilter selection, Slices slices, boolean reversed) voidunsafeSetHolder(BTreePartitionData holder) booleanuseLock()Methods inherited from class org.apache.cassandra.db.partitions.AbstractBTreePartition
build, build, build, columns, equals, hasRows, isEmpty, partitionLevelDeletion, rowCount, stats, toString, toString, unfilteredIterator, unfilteredIterator, unfilteredIteratorMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY_SIZE
public static final long EMPTY_SIZE
-
-
Constructor Details
-
AtomicBTreePartition
public AtomicBTreePartition(TableMetadataRef metadata, DecoratedKey partitionKey, MemtableAllocator allocator)
-
-
Method Details
-
holder
- Specified by:
holderin classAbstractBTreePartition
-
metadata
- Specified by:
metadatain interfacePartition- Specified by:
metadatain classAbstractBTreePartition
-
canHaveShadowedData
protected boolean canHaveShadowedData()- Specified by:
canHaveShadowedDatain classAbstractBTreePartition
-
addAll
public BTreePartitionUpdater addAll(PartitionUpdate update, Cloner cloner, OpOrder.Group writeOp, UpdateTransaction indexer) Adds a given update to this in-memtable partition.- Returns:
- an array containing first the difference in size seen after merging the updates, and second the minimum time delta between updates.
-
unsafeSetHolder
-
unsafeGetHolder
-
deletionInfo
- Overrides:
deletionInfoin classAbstractBTreePartition
-
staticRow
- Overrides:
staticRowin classAbstractBTreePartition
-
partitionKey
- Specified by:
partitionKeyin interfacePartition- Overrides:
partitionKeyin classAbstractBTreePartition
-
getRow
Description copied from interface:PartitionReturns the row corresponding to the provided clustering, or null if there is not such row.- Specified by:
getRowin interfacePartition- Overrides:
getRowin classAbstractBTreePartition- Parameters:
clustering- clustering key to search- Returns:
- row corresponding to the clustering, it's either null or non-empty row.
-
lastRow
- Overrides:
lastRowin classAbstractBTreePartition
-
unfilteredIterator
public UnfilteredRowIterator unfilteredIterator(BTreePartitionData current, ColumnFilter selection, Slices slices, boolean reversed) - Overrides:
unfilteredIteratorin classAbstractBTreePartition
-
iterator
- Specified by:
iteratorin interfaceIterable<Row>- Overrides:
iteratorin classAbstractBTreePartition
-
useLock
public boolean useLock()
-