org.springframework.cache.interceptor

## Interface CacheOperationInvoker

- Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface CacheOperationInvoker

  Abstract the invocation of a cache operation.

  Does not provide a way to transmit checked exceptions but provides a special exception that should be used to wrap any exception that was thrown by the underlying invocation. Callers are expected to handle this issue type specifically.

  Since:
    4.1
  Author:
    Stephane Nicoll

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `CacheOperationInvoker.ThrowableWrapper` Wrap any exception thrown while invoking `invoke()`.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `invoke()` Invoke the cache operation defined by this instance.

- - ### Method Detail

    - #### invoke

          @Nullable
          Object invoke()
                           throws CacheOperationInvoker.ThrowableWrapper

      Invoke the cache operation defined by this instance. Wraps any exception that is thrown during the invocation in a `CacheOperationInvoker.ThrowableWrapper`.
      Returns:
        the result of the operation
      Throws:
        `CacheOperationInvoker.ThrowableWrapper` - if an error occurred while invoking the operation