|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.task.ImportTaskManagerImpl
public class ImportTaskManagerImpl
An implementation of a ImportTaskManager
. This manager uses an ExecutorService
to run
submitted tasks.
It should have *no* external dependencies and should *not* be injectable!
Constructor Summary | |
---|---|
ImportTaskManagerImpl()
|
Method Summary | ||
---|---|---|
|
getTask()
Returns the TaskDescriptor of the current import task that's running |
|
void |
shutdownNow()
Attempts to aggressively stop the executing tasks and shuts down the underlying thread pool. |
|
|
submitTask(Callable<V> callable,
String taskName)
This submits a Callable task to the manager which can then be started at the
managers discretion, but hopefully very soon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImportTaskManagerImpl()
Method Detail |
---|
public <V> TaskDescriptor<V> submitTask(@NotNull Callable<V> callable, String taskName) throws RejectedExecutionException, AlreadyExecutingException
ImportTaskManager
Callable
task to the manager which can then be started at the
managers discretion, but hopefully very soon. The TaskDescriptor
returned is a snapshot of the task's
state when the method returns and will not change to reflect the task's future state changes.
submitTask
in interface ImportTaskManager
callable
- the long running tasktaskName
- An i18nized string describing this task
RejectedExecutionException
- if the task manager is being shutdown and cannot accept
new tasks.
AlreadyExecutingException
- if another import task is already running in the task manager.public void shutdownNow()
ImportTaskManager
shutdownNow
in interface ImportTaskManager
public <V> TaskDescriptor<V> getTask()
ImportTaskManager
TaskDescriptor
of the current import task that's running
getTask
in interface ImportTaskManager
TaskDescriptor
or null if the manager has not such task. The descriptor returned is a snapshot
of the task state when the method returns will not reflect any future changes. null
will be
returned when no matching task can be found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |