Package org.apache.cassandra.db.rows
Class ColumnData.Reconciler
java.lang.Object
org.apache.cassandra.db.rows.ColumnData.Reconciler
- All Implemented Interfaces:
AutoCloseable,UpdateFunction<ColumnData,ColumnData>
- Enclosing class:
- ColumnData
public static class ColumnData.Reconciler
extends Object
implements UpdateFunction<ColumnData,ColumnData>, AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.btree.UpdateFunction
UpdateFunction.Simple<V> -
Field Summary
Fields inherited from interface org.apache.cassandra.utils.btree.UpdateFunction
noOp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()insert(ColumnData insert) Computes the value that should be inserted in the BTree.merge(ColumnData existing, ColumnData update) Computes the result of merging the existing value with the one from the update.voidonAllocatedOnHeap(long heapSize) retain(ColumnData existing) Checks if the specified value should be deleted or not.
-
Constructor Details
-
Reconciler
public Reconciler()
-
-
Method Details
-
merge
Description copied from interface:UpdateFunctionComputes the result of merging the existing value with the one from the update.- Specified by:
mergein interfaceUpdateFunction<ColumnData,ColumnData> - 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
-
onAllocatedOnHeap
public void onAllocatedOnHeap(long heapSize) - Specified by:
onAllocatedOnHeapin interfaceUpdateFunction<ColumnData,ColumnData> - Parameters:
heapSize- extra heap space allocated (over previous tree)
-
insert
Description copied from interface:UpdateFunctionComputes the value that should be inserted in the BTree.- Specified by:
insertin interfaceUpdateFunction<ColumnData,ColumnData> - Parameters:
insert- the update value- Returns:
- the value that should be inserted in the BTree
-
retain
Checks if the specified value should be deleted or not.- Parameters:
existing- the existing value to check- Returns:
nullif the value should be removed from the BTree or the existing value if it should not.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-