Package io.temporal.worker.tuning
Class ResourceBasedTuner.Builder
- java.lang.Object
-
- io.temporal.worker.tuning.ResourceBasedTuner.Builder
-
- Enclosing class:
- ResourceBasedTuner
public static final class ResourceBasedTuner.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceBasedTunerbuild()ResourceBasedTuner.BuildersetActivitySlotOptions(ResourceBasedSlotOptions activitySlotOptions)Set the slot options for activity tasks.ResourceBasedTuner.BuildersetControllerOptions(ResourceBasedControllerOptions controllerOptions)ResourceBasedTuner.BuildersetExecutor(java.util.concurrent.ScheduledExecutorService executor)Set the executor used for checking resource usage periodically.ResourceBasedTuner.BuildersetLocalActivitySlotOptions(ResourceBasedSlotOptions localActivitySlotOptions)Set the slot options for local activity tasks.ResourceBasedTuner.BuildersetNexusSlotOptions(ResourceBasedSlotOptions nexusSlotOptions)Set the slot options for nexus tasks.ResourceBasedTuner.BuildersetWorkflowSlotOptions(ResourceBasedSlotOptions workflowSlotOptions)Set the slot options for workflow tasks.
-
-
-
Method Detail
-
setControllerOptions
public ResourceBasedTuner.Builder setControllerOptions(ResourceBasedControllerOptions controllerOptions)
-
setWorkflowSlotOptions
public ResourceBasedTuner.Builder setWorkflowSlotOptions(@Nonnull ResourceBasedSlotOptions workflowSlotOptions)
Set the slot options for workflow tasks. Has no effect after the worker using this tuner starts.Defaults to minimum 5 slots, maximum 500 slots, and no ramp throttle.
-
setActivitySlotOptions
public ResourceBasedTuner.Builder setActivitySlotOptions(@Nonnull ResourceBasedSlotOptions activitySlotOptions)
Set the slot options for activity tasks. Has no effect after the worker using this tuner starts.Defaults to minimum 1 slot, maximum 1000 slots, and 50ms ramp throttle.
-
setLocalActivitySlotOptions
public ResourceBasedTuner.Builder setLocalActivitySlotOptions(@Nonnull ResourceBasedSlotOptions localActivitySlotOptions)
Set the slot options for local activity tasks. Has no effect after the worker using this tuner starts.Defaults to minimum 1 slot, maximum 1000 slots, and 50ms ramp throttle.
-
setNexusSlotOptions
public ResourceBasedTuner.Builder setNexusSlotOptions(@Nonnull ResourceBasedSlotOptions nexusSlotOptions)
Set the slot options for nexus tasks. Has no effect after the worker using this tuner starts.Defaults to minimum 1 slot, maximum 1000 slots, and 50ms ramp throttle.
-
setExecutor
public ResourceBasedTuner.Builder setExecutor(@Nonnull java.util.concurrent.ScheduledExecutorService executor)
Set the executor used for checking resource usage periodically. Defaults to a two-thread pool.
-
build
public ResourceBasedTuner build()
-
-