Interface ExecutionContextProvider.CapturedContext

Enclosing interface:
ExecutionContextProvider
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 static interface ExecutionContextProvider.CapturedContext
  • Field Details

  • Method Details

    • run

      void run(Runnable task)
      Run the task synchronously, exactly once, under the captured context. Implementations must restore the executing thread's previous context in a finally block, including when the task throws. Task exceptions must propagate without retrying the task or falling back to execution without context.
    • wrap

      default Runnable wrap(Runnable task)
    • wrap

      default <T, U> BiConsumer<T,U> wrap(BiConsumer<T,U> callback)
    • wrap

      default <K, V> StreamingCallback<K,V> wrap(StreamingCallback<K,V> callback)