Class ContextAwareScheduledThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ScheduledThreadPoolExecutor
io.github.resilience4j.core.ContextAwareScheduledThreadPoolExecutor
- All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService, ScheduledExecutorService
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ContextPropagator> private static final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateContextAwareScheduledThreadPoolExecutor(int corePoolSize, List<ContextPropagator> contextPropagators) -
Method Summary
Modifier and TypeMethodDescription<V> ScheduledFuture<V> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) private voidsetMDCContext(Map<String, String> contextMap) Methods inherited from class ScheduledThreadPoolExecutor
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submitMethods inherited from class ThreadPoolExecutor
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, toStringMethods inherited from class AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskForMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ExecutorService
awaitTermination, close, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
-
Field Details
-
contextPropagators
-
THREAD_PREFIX
- See Also:
-
-
Constructor Details
-
ContextAwareScheduledThreadPoolExecutor
private ContextAwareScheduledThreadPoolExecutor(int corePoolSize, @Nullable List<ContextPropagator> contextPropagators)
-
-
Method Details
-
getContextPropagators
-
schedule
- Specified by:
schedulein interfaceScheduledExecutorService- Overrides:
schedulein classScheduledThreadPoolExecutor
-
schedule
- Specified by:
schedulein interfaceScheduledExecutorService- Overrides:
schedulein classScheduledThreadPoolExecutor
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) - Specified by:
scheduleAtFixedRatein interfaceScheduledExecutorService- Overrides:
scheduleAtFixedRatein classScheduledThreadPoolExecutor
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) - Specified by:
scheduleWithFixedDelayin interfaceScheduledExecutorService- Overrides:
scheduleWithFixedDelayin classScheduledThreadPoolExecutor
-
getMdcContextMap
-
setMDCContext
-
newScheduledThreadPool
-