Package org.silverpeas.core.web.index
Class IndexationProcessExecutor
- java.lang.Object
-
- org.silverpeas.core.web.index.IndexationProcessExecutor
-
@Singleton public class IndexationProcessExecutor extends Object
Handles the execution of huge indexation process.- Author:
- Yohann Chastagnier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IndexationProcessExecutor.IndexationProcess
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(IndexationProcessExecutor.IndexationProcess indexationProcess)
Executes an indexation process.
There is no error of an other one is already running.
The monitoring of executions has to be performed by caller by usingisCurrentExecution()
andstopCurrentExecutionIfAny()
methods.static IndexationProcessExecutor
get()
boolean
isCurrentExecution()
Indicates if an indexation operation is currently running.void
stopCurrentExecutionIfAny()
Stops a current indexation operation if it exists a running one.
Otherwise, nothing is done.
-
-
-
Method Detail
-
get
public static IndexationProcessExecutor get()
-
isCurrentExecution
public boolean isCurrentExecution()
Indicates if an indexation operation is currently running.- Returns:
- true if there is a current execution, false otherwise.
-
stopCurrentExecutionIfAny
public void stopCurrentExecutionIfAny()
Stops a current indexation operation if it exists a running one.
Otherwise, nothing is done.
-
execute
public void execute(IndexationProcessExecutor.IndexationProcess indexationProcess)
Executes an indexation process.
There is no error of an other one is already running.
The monitoring of executions has to be performed by caller by usingisCurrentExecution()
andstopCurrentExecutionIfAny()
methods.- Parameters:
indexationProcess
- the indexation process to execute.
-
-