Interface Invocable

All Known Subinterfaces:
Callback, Invocable.Task
All Known Implementing Classes:
Callback.Completable, Callback.Completing, Callback.Nested, CountingCallback, FutureCallback, Invocable.ReadyTask, IteratingCallback, IteratingNestedCallback, SharedBlockingCallback.Blocker

public interface Invocable

A task (typically either a Runnable or Callable that declares how it will behave when invoked:

  • blocking, the invocation will certainly block (e.g. performs blocking I/O)
  • non-blocking, the invocation will certainly not block
  • either, the invocation may block

Static methods and are provided that allow the current thread to be tagged with a ThreadLocal to indicate if it has a blocking invocation type.