Class ExecutionContext.Current

java.lang.Object
ch.tocco.nice2.boot.api.executioncontext.ExecutionContext.Current
Enclosing interface:
ExecutionContext

public static class ExecutionContext.Current extends Object
  • Method Details

    • install

      public static void install(ExecutionContext ctx)
    • get

      public static ExecutionContext get()
      Get the context for the current thread.
      Returns:
      The context for the current thread.
    • getOptional

      public static Optional<ExecutionContext> getOptional()
      Get the context for the current thread
      Returns:
      an Optional containing the context for the current thread, empty Optional if non exists
    • exec

      public static ExecutionContext exec()
      Get the context for the current thread. This is a synonym for get(), to make code using static imports more readable.
      Returns:
      The context for the current thread.
    • check

      public static boolean check()
    • clear

      public static void clear()