public class OScheduledThreadPoolExecutorWithLogging extends ScheduledThreadPoolExecutor
ScheduledThreadPoolExecutor
but also logs all exceptions happened
inside of the tasks which caused tasks to stop.ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
OScheduledThreadPoolExecutorWithLogging(int corePoolSize) |
OScheduledThreadPoolExecutorWithLogging(int corePoolSize,
RejectedExecutionHandler handler) |
OScheduledThreadPoolExecutorWithLogging(int corePoolSize,
ThreadFactory threadFactory) |
OScheduledThreadPoolExecutorWithLogging(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
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
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
public OScheduledThreadPoolExecutorWithLogging(int corePoolSize)
public OScheduledThreadPoolExecutorWithLogging(int corePoolSize, ThreadFactory threadFactory)
public OScheduledThreadPoolExecutorWithLogging(int corePoolSize, RejectedExecutionHandler handler)
public OScheduledThreadPoolExecutorWithLogging(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
protected void afterExecute(Runnable r, Throwable t)
afterExecute
in class ThreadPoolExecutor
Copyright © 2009–2020 OrientDB. All rights reserved.