Interface InstrumentedExecutor

All Superinterfaces:
Executor, RunnableInstrumenter
All Known Subinterfaces:
InstrumentedExecutorService, InstrumentedScheduledExecutorService

public interface InstrumentedExecutor extends Executor, RunnableInstrumenter
An Executor that has been instrumented to allow for propagation of thread state and other instrumentation related tasks.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • unwrap

      static Executor unwrap(Executor executor)
      Unwrap instrumented executor if needed.
      Parameters:
      executor - The executor
      Returns:
      The unwrapped value or the original one
      Since:
      4.0.0
    • unwrap

      static ExecutorService unwrap(ExecutorService executor)
      Unwrap instrumented executor if needed.
      Parameters:
      executor - The executor
      Returns:
      The unwrapped value or the original one
      Since:
      4.0.0
    • getTarget

      Executor getTarget()
      Implementors can override to specify the target Executor.
      Returns:
      The target Executor
    • execute

      default void execute(@NonNull @NonNull Runnable command)
      Specified by:
      execute in interface Executor