Class ResourceBasedTuner.Builder

  • Enclosing class:
    ResourceBasedTuner

    public static final class ResourceBasedTuner.Builder
    extends java.lang.Object
    • Method Detail

      • 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.