@ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public interface LongRunningTaskManagerInternal extends LongRunningTaskManager
LongRunningTaskManager
interface; see the package-info.java for rationale.Modifier and Type | Method and Description |
---|---|
PageResponse<LongTaskStatus> |
getAllTasks(@Nullable ConfluenceUser asUser,
LimitedRequest request)
Get all currently-tracked tasks that the specified user can see.
|
int |
getTaskCount()
Return a count of the current queued and running tasks.
|
LongRunningTaskId |
queueLongRunningTask(com.atlassian.core.task.longrunning.LongRunningTask task)
Start tracking a long running task that should be started in a new thread when
startIfQueued(com.atlassian.confluence.util.longrunning.LongRunningTaskId)
is called. |
List<LongTaskStatus> |
removeComplete()
Remove completed tasks from the tracker.
|
void |
runToCompletion(@Nullable com.atlassian.user.User user,
com.atlassian.core.task.longrunning.LongRunningTask task)
Starts a
LongRunningTask and waits for it to complete. |
void |
startIfQueued(LongRunningTaskId taskId)
Starts the task in a new thread if it has previously been queued.
|
getLongRunningTask, resume, startLongRunningTask, stop, stopTrackingLongRunningTask
LongRunningTaskId queueLongRunningTask(com.atlassian.core.task.longrunning.LongRunningTask task)
startIfQueued(com.atlassian.confluence.util.longrunning.LongRunningTaskId)
is called.task
- the task to performvoid startIfQueued(LongRunningTaskId taskId)
taskId
- the ID of the taskPageResponse<LongTaskStatus> getAllTasks(@Nullable ConfluenceUser asUser, LimitedRequest request)
List<LongTaskStatus> removeComplete()
void runToCompletion(@Nullable com.atlassian.user.User user, com.atlassian.core.task.longrunning.LongRunningTask task)
LongRunningTask
and waits for it to complete.user
- the user responsible for the tasktask
- the task to performIllegalStateException
- if the task manager has been shut downint getTaskCount()
Copyright © 2003–2021 Atlassian. All rights reserved.