Package com.linecorp.armeria.common
Interface ContextAwareScheduledExecutorService
- All Superinterfaces:
AutoCloseable
,ContextAwareExecutor
,ContextAwareExecutorService
,ContextHolder
,Executor
,ExecutorService
,ScheduledExecutorService
- All Known Subinterfaces:
ContextAwareBlockingTaskExecutor
,ContextAwareEventLoop
public interface ContextAwareScheduledExecutorService
extends ScheduledExecutorService, ContextAwareExecutorService
A delegating
ScheduledExecutorService
that sets the RequestContext
before executing any
submitted tasks.-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns theRequestContext
that was specified when creating thisContextAwareScheduledExecutorService
.of
(RequestContext context, ScheduledExecutorService executor) Returns a newContextAwareScheduledExecutorService
that sets the specifiedRequestContext
before executing any submitted tasks.Returns theScheduledExecutorService
that executes the submitted tasks without setting theRequestContext
.Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, close, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
Methods inherited from interface java.util.concurrent.ScheduledExecutorService
schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay
-
Method Details
-
of
static ContextAwareScheduledExecutorService of(RequestContext context, ScheduledExecutorService executor) Returns a newContextAwareScheduledExecutorService
that sets the specifiedRequestContext
before executing any submitted tasks. -
context
RequestContext context()Returns theRequestContext
that was specified when creating thisContextAwareScheduledExecutorService
.- Specified by:
context
in interfaceContextAwareExecutor
- Specified by:
context
in interfaceContextAwareExecutorService
- Specified by:
context
in interfaceContextHolder
-
withoutContext
ScheduledExecutorService withoutContext()Returns theScheduledExecutorService
that executes the submitted tasks without setting theRequestContext
.- Specified by:
withoutContext
in interfaceContextAwareExecutor
- Specified by:
withoutContext
in interfaceContextAwareExecutorService
-