Class PollingStrategy


  • public class PollingStrategy
    extends Object
    • Field Detail

      • DEFAULT_POLL_CREDENTIALS_TIMEOUT

        public static final Long DEFAULT_POLL_CREDENTIALS_TIMEOUT
      • DEFAULT_POLL_INTERVALS

        public static final Long[] DEFAULT_POLL_INTERVALS
    • Constructor Detail

      • PollingStrategy

        public PollingStrategy()
      • PollingStrategy

        public PollingStrategy​(TimeUnit timeUnit,
                               List<Long> pollIntervals)
      • PollingStrategy

        public PollingStrategy​(Long timeout,
                               TimeUnit timeUnit,
                               List<Long> pollIntervals)
      • PollingStrategy

        public PollingStrategy​(Long timeout,
                               TimeUnit timeUnit,
                               Long... pollIntervals)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • peakNext

        public Long peakNext()
        get next polling interval
        Returns:
        interval in milliseconds
      • popNext

        public Long popNext()
        get and remove next polling interval
        Returns:
        interval
      • getTimeout

        public Long getTimeout()
        Returns:
        timeout
      • isRepeatLast

        public boolean isRepeatLast()
      • setRepeatLast

        public void setRepeatLast​(boolean repeatLast)