public class PausableScheduledThreadPool extends ScheduledThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
PausableScheduledThreadPool(int corePoolSize,
ThreadFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeExecute(Thread t,
Runnable r) |
void |
pauseSchedule() |
void |
resumeSchedule() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, submit, submit, submitafterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskForclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedpublic PausableScheduledThreadPool(int corePoolSize,
ThreadFactory factory)
public void pauseSchedule()
public void resumeSchedule()
protected void beforeExecute(Thread t, Runnable r)
beforeExecute in class ThreadPoolExecutorpublic void shutdown()
shutdown in interface ExecutorServiceshutdown in class ScheduledThreadPoolExecutorpublic List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServiceshutdownNow in class ScheduledThreadPoolExecutorCopyright © 2021. All rights reserved.