com.atlassian.confluence.search.didyoumean
Class BuildIndexTaskManager
java.lang.Object
com.atlassian.confluence.search.didyoumean.BuildIndexTaskManager
public class BuildIndexTaskManager
- extends Object
Class that manages a single did-you-mean index build task. Only one of these
tasks can run at any one time. All interactions with a task should go through this manager.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BuildIndexTaskManager
public BuildIndexTaskManager(IndexBuilder fullIndexBuilder,
I18NBeanFactory defaultI18NBeanFactory,
EventManager eventManager)
runTask
public boolean runTask()
- Spawns a separate thread to build the did-you-mean index asynchronously.
Checks first that a build is not currently in progress.
- Returns:
- true if a build of the index was successfully started, false otherwise (implying one is currently in progress).
isTaskInProgress
public boolean isTaskInProgress()
isTaskReady
public boolean isTaskReady()
- Returns:
- true if
IndexBuilder.isReady()
is true, false otherwise.
getTaskPercentageComplete
public int getTaskPercentageComplete()
- Returns:
- the progress (as a percentage) of the currently managed task (or 0 if no task has been assigned yet)
getTaskElapsedTime
public String getTaskElapsedTime()
getIndexProgress
public BuildIndexTaskManager.IndexProgress getIndexProgress()