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 void
close()
ColumnData
insert(ColumnData insert)
Computes the value that should be inserted in the BTree.ColumnData
merge(ColumnData existing, ColumnData update)
Computes the result of merging the existing value with the one from the update.void
onAllocatedOnHeap(long heapSize)
ColumnData
retain(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:UpdateFunction
Computes the result of merging the existing value with the one from the update.- Specified by:
merge
in 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:
onAllocatedOnHeap
in interfaceUpdateFunction<ColumnData,ColumnData>
- Parameters:
heapSize
- extra heap space allocated (over previous tree)
-
insert
public ColumnData insert(ColumnData insert)
Description copied from interface:UpdateFunction
Computes the value that should be inserted in the BTree.- Specified by:
insert
in 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:
null
if the value should be removed from the BTree or the existing value if it should not.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-