Package com.linecorp.armeria.common
Interface ContextAwareScheduledExecutorService
- All Superinterfaces:
ContextHolder
,Executor
,ExecutorService
,ScheduledExecutorService
- All Known Subinterfaces:
ContextAwareEventLoop
public interface ContextAwareScheduledExecutorService extends ScheduledExecutorService
A delegating
ScheduledExecutorService
that sets the RequestContext
before executing any
submitted tasks.-
Method Summary
Modifier and Type Method Description RequestContext
context()
Returns theRequestContext
that is specified when creating thisContextAwareScheduledExecutorService
.static ContextAwareScheduledExecutorService
of(RequestContext context, ScheduledExecutorService executor)
Returns a newContextAwareScheduledExecutorService
that sets the specifiedRequestContext
before executing any submitted tasks.ScheduledExecutorService
withoutContext()
Returns theScheduledExecutorService
that is executing submitted tasks without setting theRequestContext
.Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, 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. -
withoutContext
ScheduledExecutorService withoutContext()Returns theScheduledExecutorService
that is executing submitted tasks without setting theRequestContext
. -
context
RequestContext context()Returns theRequestContext
that is specified when creating thisContextAwareScheduledExecutorService
.- Specified by:
context
in interfaceContextHolder
-