Class RunnableBackgroundProcess
- java.lang.Object
-
- org.silverpeas.core.backgroundprocess.AbstractBackgroundProcessRequest
-
- org.silverpeas.core.backgroundprocess.RunnableBackgroundProcess
-
- All Implemented Interfaces:
AbstractRequestTask.Request<AbstractRequestTask.ProcessContext>
public class RunnableBackgroundProcess extends AbstractBackgroundProcessRequest
Common implementation ofAbstractBackgroundProcessRequest
which is in charge of executing aRunnable
implementation intoBackgroundProcessTask
API.- Author:
- silveryocha
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
process()
The treatment which will be performed.static void
register(Runnable process)
Registers intoBackgroundProcessTask
context a new process to perform.static void
register(String uniqueId, Runnable process)
Registers intoBackgroundProcessTask
context a new process to perform.static void
register(String uniqueId, BackgroundProcessTask.LOCK_DURATION lockDuration, Runnable process)
Registers intoBackgroundProcessTask
context a new process to perform.-
Methods inherited from class org.silverpeas.core.backgroundprocess.AbstractBackgroundProcessRequest
getLockDuration, getUniqueId, process
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.thread.task.AbstractRequestTask.Request
getReplacementId
-
-
-
-
Method Detail
-
register
public static void register(Runnable process)
Registers intoBackgroundProcessTask
context a new process to perform.- Parameters:
process
- anAbstractBackgroundProcessRequest
implementation to perform.
-
register
public static void register(String uniqueId, Runnable process)
Registers intoBackgroundProcessTask
context a new process to perform.- Parameters:
uniqueId
- identifier of theBackgroundProcessTask
which ensures having only one process into registry with a same identifier.process
- anAbstractBackgroundProcessRequest
implementation to perform.
-
register
public static void register(String uniqueId, BackgroundProcessTask.LOCK_DURATION lockDuration, Runnable process)
Registers intoBackgroundProcessTask
context a new process to perform.- Parameters:
uniqueId
- identifier of theBackgroundProcessTask
which ensures having only one process into registry with a same identifier.lockDuration
- a lock duration to avoid executing several same process into a short time.process
- anAbstractBackgroundProcessRequest
implementation to perform.
-
process
protected void process()
Description copied from class:AbstractBackgroundProcessRequest
The treatment which will be performed.- Specified by:
process
in classAbstractBackgroundProcessRequest
-
-