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
Modifier and Type Method Description SmallRyeManagedExecutorbuild()SmallRyeManagedExecutor.Buildercleared(String... types)SmallRyeManagedExecutor.BuilderinjectionPointName(String name)SmallRyeManagedExecutor.BuildermaxAsync(int max)SmallRyeManagedExecutor.BuildermaxQueued(int max)SmallRyeManagedExecutor.Builderpropagated(String... types)SmallRyeManagedExecutor.BuilderwithExecutorService(ExecutorService executorService)Delegate execution to the given executor service instead of the default set bySmallRyeContextManager.Builder.withDefaultExecutorService(ExecutorService).SmallRyeManagedExecutor.BuilderwithNewExecutorService()Forces the creation of a new executor service.
-
-
-
Constructor Detail
-
Builder
public Builder(SmallRyeContextManager manager)
-
-
Method Detail
-
build
public SmallRyeManagedExecutor build()
- Specified by:
buildin interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
propagated
public SmallRyeManagedExecutor.Builder propagated(String... types)
- Specified by:
propagatedin interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
maxAsync
public SmallRyeManagedExecutor.Builder maxAsync(int max)
- Specified by:
maxAsyncin interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
maxQueued
public SmallRyeManagedExecutor.Builder maxQueued(int max)
- Specified by:
maxQueuedin interfaceorg.eclipse.microprofile.context.ManagedExecutor.Builder
-
cleared
public SmallRyeManagedExecutor.Builder cleared(String... types)
- Specified by:
clearedin 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 tonullto disable delegation and force creating a new executor service.- Parameters:
executorService- the executor service to delegate to, ornullto 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)
-
-