public interface IRetry<E extends Exception,F extends Exception,G extends Exception,H extends Exception,O,A extends IRetry>
Created by mwei on 9/1/15
Modifier and Type | Method and Description |
---|---|
static <T extends Exception,U extends Exception,V extends Exception,W extends Exception,R,Z extends IRetry> |
build(Class<Z> retryType,
Class<? extends T> firstExceptionType,
Class<? extends U> secondExceptionType,
Class<? extends V> thirdExceptionType,
Class<? extends W> fourthExceptionType,
IRetryable<T,U,V,W,R> runFunction) |
static <T extends Exception,U extends Exception,V extends Exception,R,Z extends IRetry> |
build(Class<Z> retryType,
Class<? extends T> firstExceptionType,
Class<? extends U> secondExceptionType,
Class<? extends V> thirdExceptionType,
IRetryable<T,U,V,RuntimeException,R> runFunction) |
static <T extends Exception,U extends Exception,R,Z extends IRetry> |
build(Class<Z> retryType,
Class<? extends T> firstExceptionType,
Class<? extends U> secondExceptionType,
IRetryable<T,U,RuntimeException,RuntimeException,R> runFunction) |
static <T extends Exception,R,Z extends IRetry> |
build(Class<Z> retryType,
Class<? extends T> firstExceptionType,
IRetryable<T,RuntimeException,RuntimeException,RuntimeException,R> runFunction) |
static <R,Z extends IRetry> |
build(Class<Z> retryType,
IRetryable<RuntimeException,RuntimeException,RuntimeException,RuntimeException,R> runFunction) |
IRetryable<E,F,G,H,O> |
getRunFunction()
Get the function that needs to be retried.
|
void |
nextWait()
Apply the retry logic.
|
default O |
run()
Run the retry.
|
default IRetry<E,F,G,H,O,A> |
setOptions(Consumer<A> settingsFunction)
Configure settings for the underlying class.
|
static <R,Z extends IRetry> IRetry<RuntimeException,RuntimeException,RuntimeException,RuntimeException,R,Z> build(Class<Z> retryType, IRetryable<RuntimeException,RuntimeException,RuntimeException,RuntimeException,R> runFunction)
static <T extends Exception,R,Z extends IRetry> IRetry<T,RuntimeException,RuntimeException,RuntimeException,R,Z> build(Class<Z> retryType, Class<? extends T> firstExceptionType, IRetryable<T,RuntimeException,RuntimeException,RuntimeException,R> runFunction)
static <T extends Exception,U extends Exception,R,Z extends IRetry> IRetry<T,U,RuntimeException,RuntimeException,R,Z> build(Class<Z> retryType, Class<? extends T> firstExceptionType, Class<? extends U> secondExceptionType, IRetryable<T,U,RuntimeException,RuntimeException,R> runFunction)
static <T extends Exception,U extends Exception,V extends Exception,R,Z extends IRetry> IRetry<T,U,V,RuntimeException,R,Z> build(Class<Z> retryType, Class<? extends T> firstExceptionType, Class<? extends U> secondExceptionType, Class<? extends V> thirdExceptionType, IRetryable<T,U,V,RuntimeException,R> runFunction)
static <T extends Exception,U extends Exception,V extends Exception,W extends Exception,R,Z extends IRetry> IRetry<T,U,V,W,R,Z> build(Class<Z> retryType, Class<? extends T> firstExceptionType, Class<? extends U> secondExceptionType, Class<? extends V> thirdExceptionType, Class<? extends W> fourthExceptionType, IRetryable<T,U,V,W,R> runFunction)
default O run() throws E extends Exception, F extends Exception, G extends Exception, H extends Exception, InterruptedException
E extends Exception
InterruptedException
default IRetry<E,F,G,H,O,A> setOptions(Consumer<A> settingsFunction)
settingsFunction
- A consumer with access to the underlying retry type.void nextWait() throws InterruptedException
InterruptedException
Copyright © 2019 CorfuDB. All rights reserved.