Package fr.gouv.vitam.common.retryable
Interface Retryable<T,E extends java.lang.Exception>
-
- All Known Implementing Classes:
RetryableOnException
,RetryableOnResult
public interface Retryable<T,E extends java.lang.Exception>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
doSleep(int attempt, java.lang.String name, RetryableParameters param, java.security.SecureRandom randomSleep, java.lang.String toPrint)
T
exec(DelegateRetry<T,E> delegate)
void
execute(DelegateRetryVoid<E> delegate)
default void
sleep(int attempt, java.lang.String name, RetryableParameters param, java.security.SecureRandom randomSleep, java.util.function.Consumer<java.lang.Exception> onException, java.lang.Exception exception)
default void
sleep(int attempt, java.lang.String name, RetryableParameters param, java.security.SecureRandom randomSleep, java.util.function.Consumer<T> onResult, T type)
-
-
-
Method Detail
-
exec
T exec(DelegateRetry<T,E> delegate) throws E extends java.lang.Exception
- Throws:
E extends java.lang.Exception
-
execute
void execute(DelegateRetryVoid<E> delegate) throws E extends java.lang.Exception
- Throws:
E extends java.lang.Exception
-
sleep
default void sleep(int attempt, java.lang.String name, RetryableParameters param, java.security.SecureRandom randomSleep, java.util.function.Consumer<T> onResult, T type)
-
sleep
default void sleep(int attempt, java.lang.String name, RetryableParameters param, java.security.SecureRandom randomSleep, java.util.function.Consumer<java.lang.Exception> onException, java.lang.Exception exception)
-
doSleep
default void doSleep(int attempt, java.lang.String name, RetryableParameters param, java.security.SecureRandom randomSleep, java.lang.String toPrint)
-
-