Package org.bonitasoft.engine.work
Class WorkServiceImpl
- java.lang.Object
-
- org.bonitasoft.engine.work.WorkServiceImpl
-
- All Implemented Interfaces:
LifecycleService,TenantLifecycleService,WorkService
@Service("workService") public class WorkServiceImpl extends java.lang.Object implements WorkServiceDirectly calls the WorkExecutorService- Author:
- Charles Souillard, Baptiste Mesta, Celine Souchet
-
-
Constructor Summary
Constructors Constructor Description WorkServiceImpl(UserTransactionService transactionService, TechnicalLoggerService loggerService, SessionAccessor sessionAccessor, WorkExecutorService workExecutorService, EngineClock engineClock, int workDelayOnMultipleXAResource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisStopped()voidpause()Temporary halt the execution of this service.voidregisterWork(WorkDescriptor workDescriptor)This operation MUST be called within an active transaction.voidresume()resume the execution the servicevoidstart()Start the servicevoidstop()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bonitasoft.engine.commons.TenantLifecycleService
init
-
-
-
-
Constructor Detail
-
WorkServiceImpl
public WorkServiceImpl(UserTransactionService transactionService, TechnicalLoggerService loggerService, SessionAccessor sessionAccessor, WorkExecutorService workExecutorService, EngineClock engineClock, @Value("${bonita.tenant.work.${db.vendor}.delayOnMultipleXAResource:0}") int workDelayOnMultipleXAResource)
-
-
Method Detail
-
registerWork
public void registerWork(WorkDescriptor workDescriptor) throws SWorkRegisterException
Description copied from interface:WorkServiceThis operation MUST be called within an active transaction. If no active transaction is found, a SWorkRegisterException is thrown- Specified by:
registerWorkin interfaceWorkService- Throws:
SWorkRegisterException
-
isStopped
public boolean isStopped()
- Specified by:
isStoppedin interfaceWorkService- Returns:
- true if the work service is stopped
-
stop
public void stop()
- Specified by:
stopin interfaceLifecycleService
-
start
public void start()
Description copied from interface:LifecycleServiceStart the service- Specified by:
startin interfaceLifecycleService
-
pause
public void pause() throws SWorkExceptionDescription copied from interface:LifecycleServiceTemporary halt the execution of this service.- Specified by:
pausein interfaceLifecycleService- Throws:
SWorkException
-
resume
public void resume()
Description copied from interface:LifecycleServiceresume the execution the service- Specified by:
resumein interfaceLifecycleService
-
-