Package io.temporal.worker.tuning
Class PollerBehaviorAutoscaling
- java.lang.Object
-
- io.temporal.worker.tuning.PollerBehaviorAutoscaling
-
- All Implemented Interfaces:
PollerBehavior
public final class PollerBehaviorAutoscaling extends java.lang.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 Summary
Constructors Constructor Description PollerBehaviorAutoscaling()Creates a new PollerBehaviorAutoscaling with default parameters.PollerBehaviorAutoscaling(java.lang.Integer minConcurrentTaskPollers, java.lang.Integer maxConcurrentTaskPollers, java.lang.Integer initialConcurrentTaskPollers)Creates a new PollerBehaviorAutoscaling with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)intgetInitialConcurrentTaskPollers()Gets the initial number of concurrent task pollers.intgetMaxConcurrentTaskPollers()Gets the maximum number of concurrent task pollers.intgetMinConcurrentTaskPollers()Gets the minimum number of concurrent task pollers.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
PollerBehaviorAutoscaling
public PollerBehaviorAutoscaling()
Creates a new PollerBehaviorAutoscaling with default parameters.Default parameters are:
- minConcurrentTaskPollers = 1
- maxConcurrentTaskPollers = 100
- initialConcurrentTaskPollers = 5
-
PollerBehaviorAutoscaling
public PollerBehaviorAutoscaling(@Nullable java.lang.Integer minConcurrentTaskPollers, @Nullable java.lang.Integer maxConcurrentTaskPollers, @Nullable java.lang.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 Detail
-
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(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-