Class RunningTriggerContextHolder
java.lang.Object
org.sterl.spring.persistent_tasks.api.task.RunningTriggerContextHolder
The
RunningTrigger
state will be provided by this context holder to any thread.
Furthermore the correlationId of this context is preferred if a context is found.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
buildOrGetCorrelationId
(String newCorrelationId) Default method to obtain a new correlation ID taking in account if an ID is set or not.static void
static RunningTrigger
<? extends Serializable> static String
static void
setContext
(RunningTrigger<? extends Serializable> context)
-
Constructor Details
-
RunningTriggerContextHolder
public RunningTriggerContextHolder()
-
-
Method Details
-
clearContext
public static void clearContext() -
getContext
-
setContext
-
getCorrelationId
-
buildOrGetCorrelationId
Default method to obtain a new correlation ID taking in account if an ID is set or not.- Parameters:
newCorrelationId
- optional desired correlationId- Returns:
- either the set correlationId or the desired one or a random build one.
-