Package io.servicetalk.client.api
Class AbstractRetryingFilterBuilder.ReadOnlyRetryableSettings<Meta>
- java.lang.Object
-
- io.servicetalk.client.api.AbstractRetryingFilterBuilder.ReadOnlyRetryableSettings<Meta>
-
- Type Parameters:
Meta- the type of meta-data forAbstractRetryingFilterBuilder.retryFor(BiPredicate)
- Enclosing class:
- AbstractRetryingFilterBuilder<Builder extends AbstractRetryingFilterBuilder<Builder,Filter,Meta>,Filter,Meta>
public static final class AbstractRetryingFilterBuilder.ReadOnlyRetryableSettings<Meta> extends java.lang.ObjectA read-only settings for retryable filters.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRetryable(Meta meta, java.lang.Throwable throwable)Checks the provided pair ofAbstractRetryingFilterBuilder.ReadOnlyRetryableSettingsandThrowablethat the case is retryable.BiIntFunction<java.lang.Throwable,Completable>newStrategy(Executor alternativeTimerExecutor)Builds a new retry strategyBiIntFunctionfor retrying withPublisher.retryWhen(BiIntFunction),Single.retryWhen(BiIntFunction), andCompletable.retryWhen(BiIntFunction)or in general with an alternative timerExecutor.
-
-
-
Method Detail
-
isRetryable
public boolean isRetryable(Meta meta, java.lang.Throwable throwable)
Checks the provided pair ofAbstractRetryingFilterBuilder.ReadOnlyRetryableSettingsandThrowablethat the case is retryable.- Parameters:
meta- a meta-data of a typeAbstractRetryingFilterBuilder.ReadOnlyRetryableSettingsto checkthrowable- an exception occurred- Returns:
trueif it is desirable to retry,falseotherwise
-
newStrategy
public BiIntFunction<java.lang.Throwable,Completable> newStrategy(Executor alternativeTimerExecutor)
Builds a new retry strategyBiIntFunctionfor retrying withPublisher.retryWhen(BiIntFunction),Single.retryWhen(BiIntFunction), andCompletable.retryWhen(BiIntFunction)or in general with an alternative timerExecutor.- Parameters:
alternativeTimerExecutor-Executorto be used to schedule timers for backoff if no executor was provided at the build time- Returns:
- a new retry strategy
BiIntFunction
-
-