UpdateFunction (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.utils.btree

## Interface UpdateFunction<K,V>

- All Superinterfaces:
    com.google.common.base.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.

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static UpdateFunction.Simple<java.lang.Object>` | `noOp`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `abortEarly()`
    `void` | `allocated(long heapSize)`
    `V` | `apply(V replacing, K update)`
    `static <K> UpdateFunction<K,K>` | `noOp()`

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

      `apply, equals`

- - ### Field Detail

    - #### noOp

          static final UpdateFunction.Simple<java.lang.Object> noOp

  - ### 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)

    - #### noOp

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

Copyright © 2018 The Apache Software Foundation