Class ExecutionContext.Current
java.lang.Object
ch.tocco.nice2.boot.api.executioncontext.ExecutionContext.Current
- Enclosing interface:
ExecutionContext
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
check()
static void
clear()
static ExecutionContext
exec()
Get the context for the current thread.static ExecutionContext
get()
Get the context for the current thread.static Optional
<ExecutionContext> Get the context for the current threadstatic void
install
(ExecutionContext ctx)
-
Method Details
-
install
-
get
Get the context for the current thread.- Returns:
- The context for the current thread.
-
getOptional
Get the context for the current thread- Returns:
- an Optional containing the context for the current thread, empty Optional if non exists
-
exec
Get the context for the current thread. This is a synonym forget()
, 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()
-