Package io.smallrye.context
Class SmallRyeManagedExecutor.Builder
- java.lang.Object
-
- io.smallrye.context.SmallRyeManagedExecutor.Builder
-
- All Implemented Interfaces:
org.eclipse.microprofile.context.ManagedExecutor.Builder
- Enclosing class:
- SmallRyeManagedExecutor
public static class SmallRyeManagedExecutor.Builder extends Object implements org.eclipse.microprofile.context.ManagedExecutor.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder(SmallRyeContextManager manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SmallRyeManagedExecutor
build()
SmallRyeManagedExecutor.Builder
cleared(String... types)
SmallRyeManagedExecutor.Builder
injectionPointName(String name)
SmallRyeManagedExecutor.Builder
maxAsync(int max)
SmallRyeManagedExecutor.Builder
maxQueued(int max)
SmallRyeManagedExecutor.Builder
propagated(String... types)
SmallRyeManagedExecutor.Builder
withExecutorService(ExecutorService executorService)
Delegate execution to the given executor service instead of the default set bySmallRyeContextManager.Builder.withDefaultExecutorService(ExecutorService)
.SmallRyeManagedExecutor.Builder
withNewExecutorService()
Forces the creation of a new executor service.
-
-
-
Constructor Detail
-
Builder
public Builder(SmallRyeContextManager manager)
-
-
Method Detail
-
build
public SmallRyeManagedExecutor build()
- Specified by:
build
in interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
propagated
public SmallRyeManagedExecutor.Builder propagated(String... types)
- Specified by:
propagated
in interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
maxAsync
public SmallRyeManagedExecutor.Builder maxAsync(int max)
- Specified by:
maxAsync
in interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
maxQueued
public SmallRyeManagedExecutor.Builder maxQueued(int max)
- Specified by:
maxQueued
in interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
cleared
public SmallRyeManagedExecutor.Builder cleared(String... types)
- Specified by:
cleared
in interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
injectionPointName
public SmallRyeManagedExecutor.Builder injectionPointName(String name)
-
withExecutorService
public SmallRyeManagedExecutor.Builder withExecutorService(ExecutorService executorService)
Delegate execution to the given executor service instead of the default set bySmallRyeContextManager.Builder.withDefaultExecutorService(ExecutorService)
. Set tonull
to disable delegation and force creating a new executor service.- Parameters:
executorService
- the executor service to delegate to, ornull
to force creating a new executor service.- Returns:
- this builder
- See Also:
withNewExecutorService()
,SmallRyeContextManager.Builder.withDefaultExecutorService(ExecutorService)
-
withNewExecutorService
public SmallRyeManagedExecutor.Builder withNewExecutorService()
Forces the creation of a new executor service. This is has the same effect as callingwithExecutorService(ExecutorService)
withnull
.- Returns:
- this builder
- See Also:
withExecutorService(ExecutorService)
,SmallRyeContextManager.Builder.withDefaultExecutorService(ExecutorService)
-
-