com.atlassian.confluence.util.longrunning.LongRunningTaskManager |
Known Indirect Subclasses |
Coordinates the creation and maintenance of batch jobs that last longer than a single web request
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve a previously started task.
| |||||||||||
Resume accepting long-running tasks after
stop(long, TimeUnit) has been called. | |||||||||||
Start some task in a new thread
| |||||||||||
Stop accepting new long running tasks.
| |||||||||||
Clean up an old task.
|
Retrieve a previously started task. The task may be completed.
user | the user responsible for the task |
---|---|
id | the ID of the task |
Resume accepting long-running tasks after stop(long, TimeUnit)
has been called. If
the long-running task manager is not stopped, this method will whistle
quietly to itself and do nothing.
Start some task in a new thread
user | the user responsible for the task |
---|---|
task | the task to perform |
IllegalStateException | if the task manager has been shut down |
---|
Stop accepting new long running tasks. All tasks that have previously been submitted will be run to completion. If this takes longer than the timeout, the method will throw an exception and the task manager will resume normal operation accepting new tasks.
timeout | the time to wait for running tasks to complete |
---|---|
unit | the unit of measurement for the timeout parameter |
TimeoutException | if the timeout is exceeded |
---|
Clean up an old task. The manager hangs on to tasks that have been completed so their status can be queried. Calling this method will remove the task from the manager entirely.
This method does not stop a task from being executed. If the task is already running it will continue to completion, you just won't be able to query its status any more.
id | the ID of the task to remove. |
---|