Class ContainerExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.openremote.container.concurrent.ContainerExecutor
- All Implemented Interfaces:
Executor,ExecutorService
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Constructor Summary
ConstructorsConstructorDescriptionContainerExecutor(String name) Creates an unbounded thread pool withSynchronousQueue, this is the same asExecutors.newCachedThreadPool().ContainerExecutor(String name, int corePoolSize, int maximumPoolSize, long keepAliveSeconds, int blockingQueueCapacity) ContainerExecutor(ThreadFactory threadFactory, RejectedExecutionHandler rejectedHandler, int corePoolSize, int maximumPoolSize, long keepAliveSeconds, BlockingQueue<Runnable> workQueue) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterExecute(Runnable runnable, Throwable throwable) Methods inherited from class java.util.concurrent.ThreadPoolExecutor
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, submit, submit
-
Constructor Details
-
ContainerExecutor
Creates an unbounded thread pool withSynchronousQueue, this is the same asExecutors.newCachedThreadPool(). -
ContainerExecutor
public ContainerExecutor(String name, int corePoolSize, int maximumPoolSize, long keepAliveSeconds, int blockingQueueCapacity) - Parameters:
blockingQueueCapacity- Set to-1if aSynchronousQueueshould be used.
-
ContainerExecutor
public ContainerExecutor(ThreadFactory threadFactory, RejectedExecutionHandler rejectedHandler, int corePoolSize, int maximumPoolSize, long keepAliveSeconds, BlockingQueue<Runnable> workQueue)
-
-
Method Details
-
afterExecute
- Overrides:
afterExecutein classThreadPoolExecutor
-