Interface UpdateFunction<K,V>

All Known Implementing Classes:
BTreePartitionUpdater, ColumnData.Reconciler, UpdateFunction.Simple

public interface UpdateFunction<K,V>
An interface defining the method to be applied to the existing and replacing object in a BTree. The objects returned by the methods will be the object that need to be stored in the BTree.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    insert(K insert)
    Computes the value that should be inserted in the BTree.
    merge(V replacing, K update)
    Computes the result of merging the existing value with the one from the update.
    static <K> UpdateFunction<K,K>
     
    void
    onAllocatedOnHeap(long heapSize)
     
  • Field Details

  • Method Details

    • insert

      V insert(K insert)
      Computes the value that should be inserted in the BTree.
      Parameters:
      insert - the update value
      Returns:
      the value that should be inserted in the BTree
    • merge

      V merge(V replacing, K update)
      Computes the result of merging the existing value with the one from the update.
      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

      void onAllocatedOnHeap(long heapSize)
      Parameters:
      heapSize - extra heap space allocated (over previous tree)
    • noOp

      static <K> UpdateFunction<K,K> noOp()