Package com.uber.cadence.internal.common
Class RpcRetryer
- java.lang.Object
-
- com.uber.cadence.internal.common.RpcRetryer
-
public final class RpcRetryer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RpcRetryer.RetryableFunc<R,E extends java.lang.Throwable>
static interface
RpcRetryer.RetryableProc<E extends java.lang.Throwable>
-
Field Summary
Fields Modifier and Type Field Description static RetryOptions
DEFAULT_RPC_RETRY_OPTIONS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends java.lang.Throwable>
voidretry(RetryOptions options, RpcRetryer.RetryableProc<T> r)
static <T extends java.lang.Throwable>
voidretry(RpcRetryer.RetryableProc<T> r)
static <R,T extends java.lang.Throwable>
RretryWithResult(RetryOptions options, RpcRetryer.RetryableFunc<R,T> r)
static <R> java.util.concurrent.CompletableFuture<R>
retryWithResultAsync(RetryOptions options, java.util.function.Supplier<java.util.concurrent.CompletableFuture<R>> function)
-
-
-
Field Detail
-
DEFAULT_RPC_RETRY_OPTIONS
public static final RetryOptions DEFAULT_RPC_RETRY_OPTIONS
-
-
Method Detail
-
retry
public static <T extends java.lang.Throwable> void retry(RetryOptions options, RpcRetryer.RetryableProc<T> r) throws T extends java.lang.Throwable
- Throws:
T extends java.lang.Throwable
-
retry
public static <T extends java.lang.Throwable> void retry(RpcRetryer.RetryableProc<T> r) throws T extends java.lang.Throwable
- Throws:
T extends java.lang.Throwable
-
retryWithResult
public static <R,T extends java.lang.Throwable> R retryWithResult(RetryOptions options, RpcRetryer.RetryableFunc<R,T> r) throws T extends java.lang.Throwable
- Throws:
T extends java.lang.Throwable
-
retryWithResultAsync
public static <R> java.util.concurrent.CompletableFuture<R> retryWithResultAsync(RetryOptions options, java.util.function.Supplier<java.util.concurrent.CompletableFuture<R>> function)
-
-