public interface RetryPolicy
PolicyStatus which indicates whether the
policy is exhausted or should continue to retry.| Modifier and Type | Method and Description |
|---|---|
default <T> org.reactivestreams.Publisher<T> |
applyPolicy(org.reactivestreams.Publisher<T> publisher,
Predicate<Throwable> shouldRetry,
Consumer<Throwable> onExhausted)
Applies the retry policy in a non blocking manner by transforming
the given
publisher into one configured to apply the retry
logic. |
PolicyStatus |
applyPolicy(Throwable cause)
Applies the retry policy by performing a blocking action.
|
PolicyStatus applyPolicy(Throwable cause)
cause - the failure which causes the retryPolicyStatusdefault <T> org.reactivestreams.Publisher<T> applyPolicy(org.reactivestreams.Publisher<T> publisher,
Predicate<Throwable> shouldRetry,
Consumer<Throwable> onExhausted)
publisher into one configured to apply the retry
logic.T - the generic type of the publisher's contentpublisher - a publisher with the items which might failshouldRetry - a predicate which evaluates each item to know if it should be retried or notonExhausted - an action to perform when the retry action has been exhaustedPublisher configured with the retry policy.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.