Class JiraThreadLocalExecutor

java.lang.Object
com.codebarrel.jira.plugin.automation.service.execution.JiraThreadLocalExecutor
All Implemented Interfaces:
ThreadLocalExecutor

@Component public class JiraThreadLocalExecutor extends Object implements ThreadLocalExecutor
  • Constructor Details

  • Method Details

    • executeAs

      public void executeAs(String traceId, @Nullable String actorKey, Runnable runnable)
      Description copied from interface: ThreadLocalExecutor
      Runs the task as a particular actor
      Specified by:
      executeAs in interface ThreadLocalExecutor
      Parameters:
      actorKey - the user key of the actor to execute as
      runnable - The task to execute in the context of the actor
    • executeAsSynchronous

      public void executeAsSynchronous(String traceId, @Nullable String actorKey, Runnable runnable)
      Description copied from interface: ThreadLocalExecutor
      Runs the task as a particular actor in synchronous context. Doesn't do any thread clean up
      Specified by:
      executeAsSynchronous in interface ThreadLocalExecutor
      Parameters:
      actorKey - the user key of the actor to execute as
      runnable - The task to execute in the context of the actor
    • executeAsWithResult

      public <V> V executeAsWithResult(String traceId, @Nullable String actorKey, Callable<V> task)
      Description copied from interface: ThreadLocalExecutor
      Runs the task as a particular actor and returns result.
      Specified by:
      executeAsWithResult in interface ThreadLocalExecutor
      Parameters:
      actorKey - the user key of the actor to execute as
      task - The task to execute in the context of the actor
      Returns:
      the result of the task