Package org.bonitasoft.engine.work
Class WorkServiceImpl
java.lang.Object
org.bonitasoft.engine.work.WorkServiceImpl
- All Implemented Interfaces:
LifecycleService,TenantLifecycleService,WorkService
Directly calls the WorkExecutorService
- Author:
- Charles Souillard, Baptiste Mesta, Celine Souchet
-
Constructor Summary
ConstructorsConstructorDescriptionWorkServiceImpl(UserTransactionService transactionService, SessionAccessor sessionAccessor, WorkExecutorService workExecutorService, EngineClock engineClock, int workDelayOnMultipleXAResource) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidregisterWork(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, waitMethods inherited from interface org.bonitasoft.engine.commons.LifecycleService
pauseMethods inherited from interface org.bonitasoft.engine.commons.TenantLifecycleService
init
-
Constructor Details
-
WorkServiceImpl
public WorkServiceImpl(UserTransactionService transactionService, SessionAccessor sessionAccessor, WorkExecutorService workExecutorService, EngineClock engineClock, @Value("${bonita.tenant.work.${db.vendor}.delayOnMultipleXAResource:0}") int workDelayOnMultipleXAResource)
-
-
Method Details
-
registerWork
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
-
resume
public void resume()Description copied from interface:LifecycleServiceresume the execution the service- Specified by:
resumein interfaceLifecycleService
-