Class ExecutionContextBuilder
- java.lang.Object
-
- io.servicetalk.transport.netty.internal.ExecutionContextBuilder
-
public final class ExecutionContextBuilder extends java.lang.ObjectA builder ofExecutionContext. If any of the components ofExecutionContextis not provided, then the corresponding component fromGlobalExecutionContextwill be chosen. If none of the components are provided thenGlobalExecutionContext.globalExecutionContext()will be returned.
-
-
Constructor Summary
Constructors Constructor Description ExecutionContextBuilder()New instance.ExecutionContextBuilder(ExecutionContextBuilder other)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutionContextBuilderbufferAllocator(BufferAllocator allocator)Sets theBufferAllocatorto use.ExecutionContextbuild()Builds a newExecutionContextor returnGlobalExecutionContext.globalExecutionContext()if none of the components are set in this builder.ExecutionContextBuilderexecutionStrategy(ExecutionStrategy strategy)Sets theExecutionStrategyto use.ExecutionContextBuilderexecutor(Executor executor)Sets theExecutorto use.ExecutionContextBuilderioExecutor(IoExecutor ioExecutor)Sets theIoExecutorto use.
-
-
-
Constructor Detail
-
ExecutionContextBuilder
public ExecutionContextBuilder()
New instance.
-
ExecutionContextBuilder
public ExecutionContextBuilder(ExecutionContextBuilder other)
Copy constructor.- Parameters:
other- existingExecutionContextBuilderto copy the config from.
-
-
Method Detail
-
ioExecutor
public ExecutionContextBuilder ioExecutor(IoExecutor ioExecutor)
Sets theIoExecutorto use.- Parameters:
ioExecutor-IoExecutorto use.- Returns:
this.
-
executor
public ExecutionContextBuilder executor(Executor executor)
Sets theExecutorto use.- Parameters:
executor-Executorto use.- Returns:
this.
-
bufferAllocator
public ExecutionContextBuilder bufferAllocator(BufferAllocator allocator)
Sets theBufferAllocatorto use.- Parameters:
allocator-BufferAllocatorto use.- Returns:
this.
-
executionStrategy
public ExecutionContextBuilder executionStrategy(ExecutionStrategy strategy)
Sets theExecutionStrategyto use.- Parameters:
strategy-ExecutionStrategyto use.- Returns:
this.
-
build
public ExecutionContext build()
Builds a newExecutionContextor returnGlobalExecutionContext.globalExecutionContext()if none of the components are set in this builder.- Returns:
ExecutionContext.
-
-