Package org.bonitasoft.engine.work
Class DefaultBonitaExecutorService
java.lang.Object
org.bonitasoft.engine.work.DefaultBonitaExecutorService
- All Implemented Interfaces:
BonitaExecutorService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultBonitaExecutorService(ThreadPoolExecutor executor, WorkFactory workFactory, EngineClock engineClock, WorkExecutionCallback workExecutionCallback, WorkExecutionAuditor workExecutionAuditor, io.micrometer.core.instrument.MeterRegistry meterRegistry) -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long workTerminationTimeout, TimeUnit seconds) voidclear the queue of workvoidshutdown and handle the queue properlyFuture<?>submit(WorkDescriptor work) Execute the work described by the work descriptor
-
Field Details
-
NUMBER_OF_WORKS_PENDING
- See Also:
-
NUMBER_OF_WORKS_RUNNING
- See Also:
-
NUMBER_OF_WORKS_EXECUTED
- See Also:
-
WORKS_UNIT
- See Also:
-
-
Constructor Details
-
DefaultBonitaExecutorService
public DefaultBonitaExecutorService(ThreadPoolExecutor executor, WorkFactory workFactory, EngineClock engineClock, WorkExecutionCallback workExecutionCallback, WorkExecutionAuditor workExecutionAuditor, io.micrometer.core.instrument.MeterRegistry meterRegistry)
-
-
Method Details
-
getExecutor
- Specified by:
getExecutorin interfaceBonitaExecutorService
-
clearAllQueues
public void clearAllQueues()Description copied from interface:BonitaExecutorServiceclear the queue of work- Specified by:
clearAllQueuesin interfaceBonitaExecutorService
-
shutdownAndEmptyQueue
public void shutdownAndEmptyQueue()Description copied from interface:BonitaExecutorServiceshutdown and handle the queue properly- Specified by:
shutdownAndEmptyQueuein interfaceBonitaExecutorService
-
submit
Description copied from interface:BonitaExecutorServiceExecute the work described by the work descriptor- Specified by:
submitin interfaceBonitaExecutorService
-
awaitTermination
public boolean awaitTermination(long workTerminationTimeout, TimeUnit seconds) throws InterruptedException - Specified by:
awaitTerminationin interfaceBonitaExecutorService- Throws:
InterruptedException
-