Interface UpdateFunction<K,​V>

  • All Superinterfaces:
    com.google.common.base.Function<K,​V>, java.util.function.Function<K,​V>
    All Known Implementing Classes:
    UpdateFunction.Simple

    public interface UpdateFunction<K,​V>
    extends com.google.common.base.Function<K,​V>
    An interface defining a function to be applied to both the object we are replacing in a BTree and the object that is intended to replace it, returning the object to actually replace it.
    • Method Detail

      • apply

        V apply​(V replacing,
                K 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
      • abortEarly

        boolean abortEarly()
        Returns:
        true if we should fail the update
      • allocated

        void allocated​(long heapSize)
        Parameters:
        heapSize - extra heap space allocated (over previous tree)