Package com.launchdarkly.eventsource
Class RetryDelayStrategy.Result
- java.lang.Object
-
- com.launchdarkly.eventsource.RetryDelayStrategy.Result
-
- Enclosing class:
- RetryDelayStrategy
public static class RetryDelayStrategy.Result extends java.lang.Object
The return type ofRetryDelayStrategy.apply(long)
.
-
-
Constructor Summary
Constructors Constructor Description Result(long delayMillis, RetryDelayStrategy next)
Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDelayMillis()
Returns the computed delay.RetryDelayStrategy
getNext()
Returns the strategy instance to be used for the next retry, or null to use the same instance as last time.
-
-
-
Constructor Detail
-
Result
public Result(long delayMillis, RetryDelayStrategy next)
Constructs an instance.- Parameters:
delayMillis
- the computed delay in millisecondsnext
- aRetryDelayStrategy
instance to be used for the next retry; null means to use the same instance as last time
-
-
Method Detail
-
getDelayMillis
public long getDelayMillis()
Returns the computed delay.- Returns:
- the delay in milliseconds
-
getNext
public RetryDelayStrategy getNext()
Returns the strategy instance to be used for the next retry, or null to use the same instance as last time.- Returns:
- a new instance or null
-
-