Class JiraThreadLocalExecutor
java.lang.Object
com.codebarrel.jira.plugin.automation.service.execution.JiraThreadLocalExecutor
- All Implemented Interfaces:
ThreadLocalExecutor
-
Constructor Summary
ConstructorsConstructorDescriptionJiraThreadLocalExecutor(UserManager userManager, JiraThreadLocalUtil jiraThreadLocalUtil, JiraAuthenticationContext authenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidRuns the task as a particular actorvoidexecuteAsSynchronous(String traceId, String actorKey, Runnable runnable) Runs the task as a particular actor in synchronous context.<V> VexecuteAsWithResult(String traceId, String actorKey, Callable<V> task) Runs the task as a particular actor and returns result.
-
Constructor Details
-
JiraThreadLocalExecutor
@Inject public JiraThreadLocalExecutor(UserManager userManager, JiraThreadLocalUtil jiraThreadLocalUtil, JiraAuthenticationContext authenticationContext)
-
-
Method Details
-
executeAs
Description copied from interface:ThreadLocalExecutorRuns the task as a particular actor- Specified by:
executeAsin interfaceThreadLocalExecutor- Parameters:
actorKey- the user key of the actor to execute asrunnable- The task to execute in the context of the actor
-
executeAsSynchronous
Description copied from interface:ThreadLocalExecutorRuns the task as a particular actor in synchronous context. Doesn't do any thread clean up- Specified by:
executeAsSynchronousin interfaceThreadLocalExecutor- Parameters:
actorKey- the user key of the actor to execute asrunnable- The task to execute in the context of the actor
-
executeAsWithResult
Description copied from interface:ThreadLocalExecutorRuns the task as a particular actor and returns result.- Specified by:
executeAsWithResultin interfaceThreadLocalExecutor- Parameters:
actorKey- the user key of the actor to execute astask- The task to execute in the context of the actor- Returns:
- the result of the task
-