-
public final class StreamRetryPolicyRetry-policy value object used by Stream’s internal implementations.
A policy answers two questions for each failed attempt:
Should we try again? — via giveUpFunction.
How long should we wait? — via nextBackOffDelayFunction.
minRetries ≥ 0maxRetries ≥ minRetries0 ≤ minBackoffMills ≤ maxBackoffMills
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classStreamRetryPolicy.Companion
-
Field Summary
Fields Modifier and Type Field Description private final IntegerminRetriesprivate final IntegermaxRetriesprivate final LongminBackoffMillsprivate final LongmaxBackoffMillsprivate final LonginitialDelayMillisprivate final Function2<Integer, Throwable, Boolean>giveUpFunctionprivate final Function2<Integer, Long, Long>nextBackOffDelayFunction
-
Method Summary
Modifier and Type Method Description final IntegergetMinRetries()final IntegergetMaxRetries()final LonggetMinBackoffMills()final LonggetMaxBackoffMills()final LonggetInitialDelayMillis()final Function2<Integer, Throwable, Boolean>getGiveUpFunction()final Function2<Integer, Long, Long>getNextBackOffDelayFunction()-
-
Method Detail
-
getMinRetries
final Integer getMinRetries()
-
getMaxRetries
final Integer getMaxRetries()
-
getMinBackoffMills
final Long getMinBackoffMills()
-
getMaxBackoffMills
final Long getMaxBackoffMills()
-
getInitialDelayMillis
final Long getInitialDelayMillis()
-
getGiveUpFunction
final Function2<Integer, Throwable, Boolean> getGiveUpFunction()
-
getNextBackOffDelayFunction
final Function2<Integer, Long, Long> getNextBackOffDelayFunction()
-
-
-
-