Package org.apache.cassandra.db.rows
Class ColumnData.Reconciler
- java.lang.Object
-
- org.apache.cassandra.db.rows.ColumnData.Reconciler
-
- All Implemented Interfaces:
java.lang.AutoCloseable,UpdateFunction<ColumnData,ColumnData>
- Enclosing class:
- ColumnData
public static class ColumnData.Reconciler extends java.lang.Object implements UpdateFunction<ColumnData,ColumnData>, java.lang.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 Constructor Description Reconciler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ColumnDatainsert(ColumnData insert)Computes the value that should be inserted in the BTree.ColumnDatamerge(ColumnData existing, ColumnData update)Computes the result of merging the existing value with the one from the update.voidonAllocatedOnHeap(long heapSize)ColumnDataretain(ColumnData existing)Checks if the specified value should be deleted or not.
-
-
-
Method Detail
-
merge
public ColumnData merge(ColumnData existing, ColumnData update)
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
public ColumnData insert(ColumnData 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
public ColumnData retain(ColumnData existing)
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 interfacejava.lang.AutoCloseable
-
-