Package org.apache.cassandra.utils.btree
Class UpdateFunction.Simple<V>
java.lang.Object
org.apache.cassandra.utils.btree.UpdateFunction.Simple<V>
- All Implemented Interfaces:
UpdateFunction<V,V>
- Enclosing interface:
- UpdateFunction<K,
V>
-
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 TypeMethodDescriptionComputes the value that should be inserted in the BTree.Computes the result of merging the existing value with the one from the update.static <V> UpdateFunction.Simple<V>of(BiFunction<V, V, V> f) voidonAllocatedOnHeap(long heapSize)
-
Constructor Details
-
Simple
-
-
Method Details
-
insert
Description copied from interface:UpdateFunctionComputes the value that should be inserted in the BTree.- Specified by:
insertin interfaceUpdateFunction<V,V> - Parameters:
v- 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<V,V> - Parameters:
replacing- 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<V,V> - Parameters:
heapSize- extra heap space allocated (over previous tree)
-
of
-