|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.util.longrunning.DefaultLongRunningTaskManager
public class DefaultLongRunningTaskManager
| Constructor Summary | |
|---|---|
DefaultLongRunningTaskManager()
|
|
| Method Summary | |
|---|---|
void |
destroy()
|
com.atlassian.core.task.longrunning.LongRunningTask |
getLongRunningTask(com.atlassian.user.User user,
LongRunningTaskId id)
gets a long running task with the given Id that was registered either by this user or the anonymous user. |
void |
resume()
Resume accepting long-running tasks after LongRunningTaskManager.stop(long, java.util.concurrent.TimeUnit) has been called. |
LongRunningTaskId |
startLongRunningTask(com.atlassian.user.User user,
com.atlassian.core.task.longrunning.LongRunningTask task)
Start some task in a new thread |
void |
stop(long timeout,
TimeUnit unit)
Stop accepting new long running tasks. |
void |
stopTrackingLongRunningTask(LongRunningTaskId id)
Clean up an old task. |
protected void |
taskFinished(LongRunningTaskId id)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLongRunningTaskManager()
| Method Detail |
|---|
public LongRunningTaskId startLongRunningTask(com.atlassian.user.User user,
com.atlassian.core.task.longrunning.LongRunningTask task)
LongRunningTaskManager
startLongRunningTask in interface LongRunningTaskManageruser - the user responsible for the tasktask - the task to perform
public com.atlassian.core.task.longrunning.LongRunningTask getLongRunningTask(com.atlassian.user.User user,
LongRunningTaskId id)
getLongRunningTask in interface LongRunningTaskManageruser - the user responsible for the taskid - the ID of the task
public void stopTrackingLongRunningTask(LongRunningTaskId id)
LongRunningTaskManagerThis 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.
stopTrackingLongRunningTask in interface LongRunningTaskManagerid - the ID of the task to remove.
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanException
public void stop(long timeout,
TimeUnit unit)
throws TimeoutException
LongRunningTaskManager
stop in interface LongRunningTaskManagertimeout - the time to wait for running tasks to completeunit - the unit of measurement for the timeout parameter
TimeoutException - if the timeout is exceededpublic void resume()
LongRunningTaskManagerLongRunningTaskManager.stop(long, java.util.concurrent.TimeUnit) has been called. If
the long-running task manager is not stopped, this method will whistle
quietly to itself and do nothing.
resume in interface LongRunningTaskManagerprotected void taskFinished(LongRunningTaskId id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||