Class PollingStrategy
- java.lang.Object
-
- com.cumulocity.sdk.client.polling.PollingStrategy
-
public class PollingStrategy extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static Long
DEFAULT_POLL_CREDENTIALS_TIMEOUT
static Long[]
DEFAULT_POLL_INTERVALS
-
Constructor Summary
Constructors Constructor Description PollingStrategy()
PollingStrategy(Long timeout, TimeUnit timeUnit, Long... pollIntervals)
PollingStrategy(Long timeout, TimeUnit timeUnit, List<Long> pollIntervals)
PollingStrategy(TimeUnit timeUnit, List<Long> pollIntervals)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getTimeout()
boolean
isEmpty()
boolean
isRepeatLast()
Long
peakNext()
get next polling intervalLong
popNext()
get and remove next polling intervalvoid
setRepeatLast(boolean repeatLast)
-
-
-
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)
-
-