Class 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 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:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object