Class ContainerScheduledExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ScheduledThreadPoolExecutor
org.openremote.container.concurrent.ContainerScheduledExecutor
- All Implemented Interfaces:
Executor
,ExecutorService
,ScheduledExecutorService
Thread pool that adds logging for tasks that throw exceptions
-
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
ConstructorsConstructorDescriptionContainerScheduledExecutor
(String name, int corePoolSize) ContainerScheduledExecutor
(String name, int corePoolSize, RejectedExecutionHandler rejectedHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterExecute
(Runnable runnable, Throwable throwable) protected static void
logExceptionCause
(Runnable runnable, Throwable throwable) protected static Throwable
Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toString
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
-
Field Details
-
LOG
-
-
Constructor Details
-
ContainerScheduledExecutor
-
ContainerScheduledExecutor
public ContainerScheduledExecutor(String name, int corePoolSize, RejectedExecutionHandler rejectedHandler)
-
-
Method Details
-
afterExecute
- Overrides:
afterExecute
in classThreadPoolExecutor
-
logExceptionCause
-
unwrap
- Throws:
IllegalArgumentException
-