Package org.bonitasoft.engine.work
Class BonitaThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.bonitasoft.engine.work.BonitaThreadPoolExecutor
- All Implemented Interfaces:
Executor,ExecutorService,BonitaExecutorService
- Author:
- Julien Reboul, Baptiste Mesta
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBonitaThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler, WorkFactory workFactory, EngineClock engineClock, WorkExecutionCallback workExecutionCallback, WorkExecutionAuditor workExecutionAuditor, io.micrometer.core.instrument.MeterRegistry meterRegistry, long tenantId) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear the queue of workvoidshutdown and handle the queue properlyFuture<?>voidsubmit(WorkDescriptor work) Execute the work described by the work descriptorMethods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toStringMethods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submitMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bonitasoft.engine.work.BonitaExecutorService
awaitTermination
-
Field Details
-
NUMBER_OF_WORKS_PENDING
- See Also:
-
NUMBER_OF_WORKS_RUNNING
- See Also:
-
NUMBER_OF_WORKS_EXECUTED
- See Also:
-
-
Constructor Details
-
BonitaThreadPoolExecutor
public BonitaThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler, WorkFactory workFactory, EngineClock engineClock, WorkExecutionCallback workExecutionCallback, WorkExecutionAuditor workExecutionAuditor, io.micrometer.core.instrument.MeterRegistry meterRegistry, long tenantId)
-
-
Method Details
-
clearAllQueues
public void clearAllQueues()Description copied from interface:BonitaExecutorServiceclear the queue of work- Specified by:
clearAllQueuesin interfaceBonitaExecutorService
-
submit
- Specified by:
submitin interfaceExecutorService- Overrides:
submitin classAbstractExecutorService
-
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
-