Class PollingStrategy

java.lang.Object
com.cumulocity.sdk.client.polling.PollingStrategy

public class PollingStrategy extends Object
  • Field Details

    • DEFAULT_POLL_CREDENTIALS_TIMEOUT

      public static final Long DEFAULT_POLL_CREDENTIALS_TIMEOUT
    • DEFAULT_POLL_INTERVALS

      public static final Long[] DEFAULT_POLL_INTERVALS
  • Constructor Details

    • 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 Details

    • 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)