org.apache.cassandra.utils.btree

## Interface UpdateFunction<V>

- Type Parameters:
    `V` -
  All Superinterfaces:
    com.google.common.base.Function<V,V>
  All Known Implementing Classes:
    UpdateFunction.NoOp

      public interface UpdateFunction<V>
      extends com.google.common.base.Function<V,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.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `UpdateFunction.NoOp<V>`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `abortEarly()`
    `void` | `allocated(long heapSize)`
    `V` | `apply(V replacing, V update)`

    - ### Methods inherited from interface com.google.common.base.Function

      `apply, equals`

- - ### Method Detail

    - #### apply

          V apply(V replacing,
                  V 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)

Copyright © 2018 The Apache Software Foundation