public class

ImportTaskManagerImpl

extends Object
implements ImportTaskManager
java.lang.Object
   ↳ com.atlassian.jira.task.ImportTaskManagerImpl

Class Overview

An implementation of a ImportTaskManager. This manager uses an java.util.concurrent.ExecutorService to run submitted tasks. It should have *no* external dependencies and should *not* be injectable!

Summary

Public Constructors
ImportTaskManagerImpl()
Public Methods
void clearCachedResourceBundleStrings()
Clears a set of cached I18n strings used by import progress page (JRADEV-22513)
Map<StringString> getCachedResourceBundleStrings()
Returns a set of cached I18n strings used by import progress page (JRADEV-22513)
<V extends Serializable> TaskDescriptor<V> 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> TaskDescriptor<V> 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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.task.ImportTaskManager

Public Constructors

public ImportTaskManagerImpl ()

Public Methods

public void clearCachedResourceBundleStrings ()

Clears a set of cached I18n strings used by import progress page (JRADEV-22513)

public Map<StringString> getCachedResourceBundleStrings ()

Returns a set of cached I18n strings used by import progress page (JRADEV-22513)

public TaskDescriptor<V> getTask ()

Returns the TaskDescriptor of the current import task that's running

Returns
  • a 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.

public void prepareCachedResourceBundleStrings (Locale locale)

Prepares a set of cached I18n strings used by import progress page (JRADEV-22513)

public void shutdownNow ()

Attempts to aggressively stop the executing tasks and shuts down the underlying thread pool.

public TaskDescriptor<V> 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. 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.

Parameters
callable the long running task
taskName An i18nized string describing this task
Returns
  • a TaskDescriptor for the new long running task. The returned descriptor is a snapshot of the task state when the method returns and will not reflect any future changes.