Class PollerBehaviorAutoscaling

java.lang.Object
io.temporal.worker.tuning.PollerBehaviorAutoscaling
All Implemented Interfaces:
PollerBehavior

public final class PollerBehaviorAutoscaling extends Object implements PollerBehavior
A poller behavior that will automatically scale the number of pollers based on feedback from the server. A slot must be available before beginning polling.

If the server does not support autoscaling, then the number of pollers will stay at the initial number of pollers.

  • Constructor Details

    • PollerBehaviorAutoscaling

      public PollerBehaviorAutoscaling()
      Creates a new PollerBehaviorAutoscaling with default parameters.

      Default parameters are:

      • minConcurrentTaskPollers = 1
      • maxConcurrentTaskPollers = 100
      • initialConcurrentTaskPollers = 5
    • PollerBehaviorAutoscaling

      public PollerBehaviorAutoscaling(@Nullable Integer minConcurrentTaskPollers, @Nullable Integer maxConcurrentTaskPollers, @Nullable Integer initialConcurrentTaskPollers)
      Creates a new PollerBehaviorAutoscaling with the specified parameters.
      Parameters:
      minConcurrentTaskPollers - Minimum number of concurrent task pollers. Default is 1.
      maxConcurrentTaskPollers - Maximum number of concurrent task pollers. Default is 100.
      initialConcurrentTaskPollers - Initial number of concurrent task pollers. Default is 5.
  • Method Details

    • getMinConcurrentTaskPollers

      public int getMinConcurrentTaskPollers()
      Gets the minimum number of concurrent task pollers.
      Returns:
      Minimum number of concurrent task pollers.
    • getMaxConcurrentTaskPollers

      public int getMaxConcurrentTaskPollers()
      Gets the maximum number of concurrent task pollers.
      Returns:
      Maximum number of concurrent task pollers.
    • getInitialConcurrentTaskPollers

      public int getInitialConcurrentTaskPollers()
      Gets the initial number of concurrent task pollers.
      Returns:
      Initial number of concurrent task pollers.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object