public class DefaultProxyTimerService extends ScheduledThreadPoolExecutor implements ProxyTimerService
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Modifier and Type | Field and Description |
|---|---|
protected static int |
numCancelled |
static int |
SCHEDULER_THREAD_POOL_DEFAULT_SIZE |
| Constructor and Description |
|---|
DefaultProxyTimerService(int corePoolSize) |
DefaultProxyTimerService(int corePoolSize,
RejectedExecutionHandler handler) |
DefaultProxyTimerService(int corePoolSize,
ThreadFactory threadFactory) |
DefaultProxyTimerService(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler) |
DefaultProxyTimerService(String applicationName) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(TimerTask task) |
boolean |
isStarted() |
void |
schedule(TimerTask task,
long delay) |
void |
start() |
void |
stop() |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submitafterExecute, 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, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskForclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedprotected static volatile int numCancelled
public static final int SCHEDULER_THREAD_POOL_DEFAULT_SIZE
public DefaultProxyTimerService(String applicationName)
public DefaultProxyTimerService(int corePoolSize)
public DefaultProxyTimerService(int corePoolSize,
ThreadFactory threadFactory)
corePoolSize - threadFactory - public DefaultProxyTimerService(int corePoolSize,
RejectedExecutionHandler handler)
corePoolSize - handler - public DefaultProxyTimerService(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler)
corePoolSize - threadFactory - handler - public void cancel(TimerTask task)
cancel in interface ProxyTimerServicepublic boolean isStarted()
isStarted in interface ProxyTimerServicepublic void schedule(TimerTask task, long delay)
schedule in interface ProxyTimerServicepublic void stop()
stop in interface ProxyTimerServicepublic void start()
start in interface ProxyTimerServiceCopyright © 2016. All Rights Reserved.