public class

BuildIndexTaskManager

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.search.didyoumean.BuildIndexTaskManager

Class Overview

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.

Summary

Nested Classes
class BuildIndexTaskManager.IndexProgress  
Public Constructors
BuildIndexTaskManager(IndexBuilder fullIndexBuilder, I18NBeanFactory defaultI18NBeanFactory, EventManager eventManager)
Public Methods
synchronized BuildIndexTaskManager.IndexProgress getIndexProgress()
synchronized String getTaskElapsedTime()
synchronized int getTaskPercentageComplete()
synchronized boolean isTaskInProgress()
boolean isTaskReady()
synchronized boolean runTask()
Spawns a separate thread to build the did-you-mean index asynchronously.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BuildIndexTaskManager (IndexBuilder fullIndexBuilder, I18NBeanFactory defaultI18NBeanFactory, EventManager eventManager)

Public Methods

public synchronized BuildIndexTaskManager.IndexProgress getIndexProgress ()

public synchronized String getTaskElapsedTime ()

public synchronized int getTaskPercentageComplete ()

Returns
  • the progress (as a percentage) of the currently managed task (or 0 if no task has been assigned yet)

public synchronized boolean isTaskInProgress ()

public boolean isTaskReady ()

Returns

public synchronized 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).