Class BTreePartitionUpdater
java.lang.Object
org.apache.cassandra.db.partitions.BTreePartitionUpdater
- All Implemented Interfaces:
ColumnData.PostReconciliationFunction,UpdateFunction<Row,Row>
public class BTreePartitionUpdater
extends Object
implements UpdateFunction<Row,Row>, ColumnData.PostReconciliationFunction
the function we provide to the trie and btree utilities to perform any row and column replacements
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.btree.UpdateFunction
UpdateFunction.Simple<V> -
Field Summary
FieldsFields inherited from interface org.apache.cassandra.utils.btree.UpdateFunction
noOp -
Constructor Summary
ConstructorsConstructorDescriptionBTreePartitionUpdater(MemtableAllocator allocator, Cloner cloner, OpOrder.Group writeOp, UpdateTransaction indexer) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(ColumnData existing) insert(ColumnData insert) Computes the value that should be inserted in the BTree.protected BTreePartitionDatamakeMergedPartition(BTreePartitionData current, PartitionUpdate update) Cell<?>Computes the result of merging the existing value with the one from the update.mergePartitions(BTreePartitionData current, PartitionUpdate update) voidonAllocatedOnHeap(long heapSize) void
-
Field Details
-
dataSize
public long dataSize -
colUpdateTimeDelta
public long colUpdateTimeDelta
-
-
Constructor Details
-
BTreePartitionUpdater
public BTreePartitionUpdater(MemtableAllocator allocator, Cloner cloner, OpOrder.Group writeOp, UpdateTransaction indexer)
-
-
Method Details
-
mergePartitions
-
makeMergedPartition
protected BTreePartitionData makeMergedPartition(BTreePartitionData current, PartitionUpdate update) -
insert
Description copied from interface:UpdateFunctionComputes the value that should be inserted in the BTree.- Specified by:
insertin interfaceUpdateFunction<Row,Row> - Parameters:
insert- the update value- Returns:
- the value that should be inserted in the BTree
-
merge
Description copied from interface:UpdateFunctionComputes the result of merging the existing value with the one from the update.- Specified by:
mergein interfaceUpdateFunction<Row,Row> - Parameters:
existing- the value in the original tree we have matchedupdate- the value in the updating collection that matched- Returns:
- the value to insert into the new tree
-
merge
- Specified by:
mergein interfaceColumnData.PostReconciliationFunction
-
insert
- Specified by:
insertin interfaceColumnData.PostReconciliationFunction
-
delete
- Specified by:
deletein interfaceColumnData.PostReconciliationFunction
-
onAllocatedOnHeap
public void onAllocatedOnHeap(long heapSize) - Specified by:
onAllocatedOnHeapin interfaceColumnData.PostReconciliationFunction- Specified by:
onAllocatedOnHeapin interfaceUpdateFunction<Row,Row> - Parameters:
heapSize- extra heap space allocated (over previous tree)
-
reportAllocatedMemory
public void reportAllocatedMemory()
-