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>

public static final class UpdateFunction.Simple<V> extends Object implements UpdateFunction<V,V>
  • Constructor Details

  • Method Details

    • insert

      public V insert(V v)
      Description copied from interface: UpdateFunction
      Computes the value that should be inserted in the BTree.
      Specified by:
      insert in interface UpdateFunction<V,V>
      Parameters:
      v - the update value
      Returns:
      the value that should be inserted in the BTree
    • merge

      public V merge(V replacing, V update)
      Description copied from interface: UpdateFunction
      Computes the result of merging the existing value with the one from the update.
      Specified by:
      merge in interface UpdateFunction<V,V>
      Parameters:
      replacing - the value in the original tree we have matched
      update - 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 interface UpdateFunction<V,V>
      Parameters:
      heapSize - extra heap space allocated (over previous tree)
    • of

      public static <V> UpdateFunction.Simple<V> of(BiFunction<V,V,V> f)