@InterfaceAudience.Private public class JitterScheduledThreadPoolExecutorImpl extends ScheduledThreadPoolExecutor
Modifier and Type | Class and Description |
---|---|
protected class |
JitterScheduledThreadPoolExecutorImpl.JitteredRunnableScheduledFuture<V>
Class that basically just defers to the wrapped future.
|
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
JitterScheduledThreadPoolExecutorImpl(int corePoolSize,
ThreadFactory threadFactory,
double spread)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
protected <V> RunnableScheduledFuture<V> |
decorateTask(Callable<V> callable,
RunnableScheduledFuture<V> task) |
protected <V> RunnableScheduledFuture<V> |
decorateTask(Runnable runnable,
RunnableScheduledFuture<V> task) |
execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
afterExecute, 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 JitterScheduledThreadPoolExecutorImpl(int corePoolSize, ThreadFactory threadFactory, double spread)
spread
- The percent up and down that RunnableScheduledFuture.getDelay should be jittered.protected <V> RunnableScheduledFuture<V> decorateTask(Runnable runnable, RunnableScheduledFuture<V> task)
decorateTask
in class ScheduledThreadPoolExecutor
protected <V> RunnableScheduledFuture<V> decorateTask(Callable<V> callable, RunnableScheduledFuture<V> task)
decorateTask
in class ScheduledThreadPoolExecutor
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.