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.Object
A read-only settings for retryable filters.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRetryable(Meta meta, java.lang.Throwable throwable)
Checks the provided pair ofAbstractRetryingFilterBuilder.ReadOnlyRetryableSettings
andThrowable
that the case is retryable.BiIntFunction<java.lang.Throwable,Completable>
newStrategy(Executor alternativeTimerExecutor)
Builds a new retry strategyBiIntFunction
for 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.ReadOnlyRetryableSettings
andThrowable
that the case is retryable.- Parameters:
meta
- a meta-data of a typeAbstractRetryingFilterBuilder.ReadOnlyRetryableSettings
to checkthrowable
- an exception occurred- Returns:
true
if it is desirable to retry,false
otherwise
-
newStrategy
public BiIntFunction<java.lang.Throwable,Completable> newStrategy(Executor alternativeTimerExecutor)
Builds a new retry strategyBiIntFunction
for retrying withPublisher.retryWhen(BiIntFunction)
,Single.retryWhen(BiIntFunction)
, andCompletable.retryWhen(BiIntFunction)
or in general with an alternative timerExecutor
.- Parameters:
alternativeTimerExecutor
-Executor
to be used to schedule timers for backoff if no executor was provided at the build time- Returns:
- a new retry strategy
BiIntFunction
-
-