Package com.linecorp.armeria.common
Interface ContextAwareBlockingTaskExecutor
- All Superinterfaces:
AutoCloseable
,BlockingTaskExecutor
,ContextAwareExecutor
,ContextAwareExecutorService
,ContextAwareScheduledExecutorService
,ContextHolder
,Executor
,ExecutorService
,ScheduledExecutorService
public interface ContextAwareBlockingTaskExecutor
extends BlockingTaskExecutor, ContextAwareScheduledExecutorService
A delegating
BlockingTaskExecutor
that sets the RequestContext
before executing
any submitted tasks.-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns theRequestContext
that was specified when creating thisContextAwareBlockingTaskExecutor
.of
(RequestContext context, BlockingTaskExecutor executor) Returns a newContextAwareBlockingTaskExecutor
that sets the specifiedRequestContext
before executing any submitted tasks.Returns theBlockingTaskExecutor
that executes the submitted tasks without setting theRequestContext
.Methods inherited from interface com.linecorp.armeria.common.util.BlockingTaskExecutor
unwrap
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
Returns a newContextAwareBlockingTaskExecutor
that sets the specifiedRequestContext
before executing any submitted tasks. -
context
RequestContext context()Returns theRequestContext
that was specified when creating thisContextAwareBlockingTaskExecutor
.- Specified by:
context
in interfaceContextAwareExecutor
- Specified by:
context
in interfaceContextAwareExecutorService
- Specified by:
context
in interfaceContextAwareScheduledExecutorService
- Specified by:
context
in interfaceContextHolder
-
withoutContext
BlockingTaskExecutor withoutContext()Returns theBlockingTaskExecutor
that executes the submitted tasks without setting theRequestContext
.- Specified by:
withoutContext
in interfaceContextAwareExecutor
- Specified by:
withoutContext
in interfaceContextAwareExecutorService
- Specified by:
withoutContext
in interfaceContextAwareScheduledExecutorService
-