public class ImportTaskManagerImpl extends Object implements ImportTaskManager
ImportTaskManager. This manager uses an ExecutorService to run
submitted tasks.
It should have *no* external dependencies and should *not* be injectable!
| Constructor and Description |
|---|
ImportTaskManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCachedResourceBundleStrings()
Clears a set of cached I18n strings used by import progress page (JRADEV-22513)
|
Map<String,String> |
getCachedResourceBundleStrings()
Returns a set of cached I18n strings used by import progress page (JRADEV-22513)
|
<V extends Serializable> |
getTask()
Returns the
TaskDescriptor of the current import task that's running |
void |
prepareCachedResourceBundleStrings(Locale locale)
Prepares a set of cached I18n strings used by import progress page (JRADEV-22513)
|
void |
shutdownNow()
Attempts to aggressively stop the executing tasks and shuts down the underlying thread pool.
|
<V extends Serializable> |
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. |
<V extends Serializable> |
submitTask(Callable<V> callable,
String taskName,
SpanningOperation spanningOperation)
This submits a
Callable task to the manager which can then be started at the
managers discretion, but hopefully very soon. |
public void prepareCachedResourceBundleStrings(Locale locale)
ImportTaskManagerprepareCachedResourceBundleStrings in interface ImportTaskManagerpublic Map<String,String> getCachedResourceBundleStrings()
ImportTaskManagergetCachedResourceBundleStrings in interface ImportTaskManagerpublic void clearCachedResourceBundleStrings()
ImportTaskManagerclearCachedResourceBundleStrings in interface ImportTaskManagerpublic <V extends Serializable> TaskDescriptor<V> submitTask(@Nonnull Callable<V> callable, String taskName) throws RejectedExecutionException
ImportTaskManagerCallable 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 ImportTaskManagercallable - the long running tasktaskName - An i18nized string describing this taskRejectedExecutionException - 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 <V extends Serializable> TaskDescriptor<V> submitTask(@Nonnull Callable<V> callable, String taskName, @Nullable SpanningOperation spanningOperation) throws RejectedExecutionException
ImportTaskManagerCallable 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 ImportTaskManagercallable - the long running tasktaskName - An i18nized string describing this taskspanningOperation - Operation that this task is part ofRejectedExecutionException - 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()
ImportTaskManagershutdownNow in interface ImportTaskManagerpublic <V extends Serializable> TaskDescriptor<V> getTask()
ImportTaskManagerTaskDescriptor of the current import task that's runninggetTask in interface ImportTaskManagerTaskDescriptor 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.Copyright © 2002-2019 Atlassian. All Rights Reserved.