public class LogScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
ThreadPoolExecutor that can additionally
schedule commands to run after a given delay with a logger witch can print
error message for failed execution.ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| 构造器和说明 |
|---|
LogScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler,
String name) |
LogScheduledThreadPoolExecutor(int corePoolSize,
String name) |
LogScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String name) |
LogScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
String |
getName() |
protected void |
terminated() |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submitallowCoreThreadTimeOut, 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, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskForawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedpublic LogScheduledThreadPoolExecutor(int corePoolSize,
String name)
public LogScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
String name)
public LogScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler,
String name)
public LogScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String name)
public String getName()
protected void afterExecute(Runnable r, Throwable t)
afterExecute 在类中 ThreadPoolExecutorprotected void terminated()
terminated 在类中 ThreadPoolExecutorCopyright © 2021. All rights reserved.