Class RunningTriggerContextHolder

java.lang.Object
org.sterl.spring.persistent_tasks.api.task.RunningTriggerContextHolder

public class RunningTriggerContextHolder extends Object
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 Details

    • RunningTriggerContextHolder

      public RunningTriggerContextHolder()
  • Method Details

    • clearContext

      public static void clearContext()
    • getContext

      public static RunningTrigger<? extends Serializable> getContext()
    • setContext

      public static void setContext(RunningTrigger<? extends Serializable> context)
    • getCorrelationId

      public static String getCorrelationId()
    • buildOrGetCorrelationId

      public static String buildOrGetCorrelationId(String newCorrelationId)
      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.