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 LongDEFAULT_POLL_CREDENTIALS_TIMEOUTstatic 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 LonggetTimeout()booleanisEmpty()booleanisRepeatLast()LongpeakNext()get next polling intervalLongpopNext()get and remove next polling intervalvoidsetRepeatLast(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)
-
-