Package alluxio.retry
Class ExponentialTimeBoundedRetry.Builder
- java.lang.Object
-
- alluxio.retry.ExponentialTimeBoundedRetry.Builder
-
- Enclosing class:
- ExponentialTimeBoundedRetry
public static class ExponentialTimeBoundedRetry.Builder extends java.lang.Object
Builder for time bounded exponential retry mechanisms.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExponentialTimeBoundedRetry
build()
ExponentialTimeBoundedRetry.Builder
withInitialSleep(java.time.Duration initialSleep)
ExponentialTimeBoundedRetry.Builder
withMaxDuration(java.time.Duration maxDuration)
ExponentialTimeBoundedRetry.Builder
withMaxSleep(java.time.Duration maxSleep)
ExponentialTimeBoundedRetry.Builder
withSkipInitialSleep()
first sleep will be skipped.ExponentialTimeBoundedRetry.Builder
withTimeCtx(TimeContext timeCtx)
-
-
-
Method Detail
-
withTimeCtx
public ExponentialTimeBoundedRetry.Builder withTimeCtx(TimeContext timeCtx)
- Parameters:
timeCtx
- time context- Returns:
- the builder
-
withMaxDuration
public ExponentialTimeBoundedRetry.Builder withMaxDuration(java.time.Duration maxDuration)
- Parameters:
maxDuration
- max total duration to retry for- Returns:
- the builder
-
withInitialSleep
public ExponentialTimeBoundedRetry.Builder withInitialSleep(java.time.Duration initialSleep)
- Parameters:
initialSleep
- initial sleep interval between retries- Returns:
- the builder
-
withMaxSleep
public ExponentialTimeBoundedRetry.Builder withMaxSleep(java.time.Duration maxSleep)
- Parameters:
maxSleep
- maximum sleep interval between retries- Returns:
- the builder
-
withSkipInitialSleep
public ExponentialTimeBoundedRetry.Builder withSkipInitialSleep()
first sleep will be skipped.- Returns:
- the builder
-
build
public ExponentialTimeBoundedRetry build()
- Returns:
- the built retry mechanism
-
-