Class PollerBehaviorAutoscaling
java.lang.Object
io.temporal.worker.tuning.PollerBehaviorAutoscaling
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionCreates a new PollerBehaviorAutoscaling with default parameters.PollerBehaviorAutoscaling(Integer minConcurrentTaskPollers, Integer maxConcurrentTaskPollers, Integer initialConcurrentTaskPollers) Creates a new PollerBehaviorAutoscaling with the specified parameters. -
Method Summary
-
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
-
hashCode
-
toString
-