Class ExecutionContextBuilder<ES extends ExecutionStrategy>
java.lang.Object
io.servicetalk.transport.netty.internal.ExecutionContextBuilder<ES>
- Type Parameters:
ES
- The type of execution strategy for the resulting context
A builder of
ExecutionContext
. If any of the components of ExecutionContext
is not provided, then
the corresponding component from GlobalExecutionContext
will be chosen. If none of the components are
provided then GlobalExecutionContext.globalExecutionContext()
will be returned.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BufferAllocator
protected final Supplier<ExecutionContext<ES>>
protected Executor
protected IoExecutor
protected ES
-
Constructor Summary
ConstructorsConstructorDescriptionNew instance.ExecutionContextBuilder
(ExecutionContext<ES> defaultContext) New instance.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbufferAllocator
(BufferAllocator allocator) Sets theBufferAllocator
to use.build()
Builds a newExecutionContext
or return the default context if none of the components are set in this builder.executionStrategy
(ES strategy) Sets theExecutionStrategy
to use.Sets theExecutor
to use.ioExecutor
(IoExecutor ioExecutor) Sets theIoExecutor
to use.
-
Field Details
-
defaultContextSupplier
-
ioExecutor
-
executor
-
allocator
-
strategy
-
-
Constructor Details
-
ExecutionContextBuilder
public ExecutionContextBuilder()New instance. -
ExecutionContextBuilder
New instance.- Parameters:
defaultContext
- context to be used for uninitialized members or to be returned from build if all members are uninitialized.
-
ExecutionContextBuilder
Copy constructor.- Parameters:
other
- existingExecutionContextBuilder
to copy the config from.
-
-
Method Details
-
ioExecutor
Sets theIoExecutor
to use.- Parameters:
ioExecutor
-IoExecutor
to use.- Returns:
this
.
-
executor
Sets theExecutor
to use.- Parameters:
executor
-Executor
to use.- Returns:
this
.
-
bufferAllocator
Sets theBufferAllocator
to use.- Parameters:
allocator
-BufferAllocator
to use.- Returns:
this
.
-
executionStrategy
Sets theExecutionStrategy
to use.- Parameters:
strategy
-ExecutionStrategy
to use.- Returns:
this
.
-
build
Builds a newExecutionContext
or return the default context if none of the components are set in this builder.- Returns:
ExecutionContext
.
-