Class PollableOptions

    • Constructor Detail

      • PollableOptions

        public PollableOptions()
      • PollableOptions

        public PollableOptions​(PollableOptions pollableOptions)
    • Method Detail

      • constantStrategy

        public PollableOptions constantStrategy​(int interval)
        Creates a constant polling strategy.
        Parameters:
        interval - the constant interval at which to poll
        Returns:
        this
      • linearStrategy

        public PollableOptions linearStrategy​(int start,
                                              int increment)
        Creates a linear polling strategy.
        Parameters:
        start - the base interval at which to poll
        increment - the increment at which the starting interval is increased each poll
        Returns:
        this
      • exponentialStrategy

        public PollableOptions exponentialStrategy​(int interval,
                                                   int min,
                                                   int max)
        Creates an exponential polling strategy.
        Parameters:
        interval - the base interval
        min - the minimum interval at which to poll
        max - the minimum interval at which to poll
        Returns:
        this
      • getErrorLimit

        public int getErrorLimit()
        This represents the number of polling failures permitted before stopping.
      • getLimit

        public int getLimit()
        This represents the number of poll requests permitted before stopping.
      • getStrategy

        public PollableOptions.PollStrategy<?> getStrategy()
        This represents the strategy used for calculating the interval between each poll request.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object