public class RetryProxy
extends java.lang.Object
A factory for creating retry proxies.
| Constructor | Description |
|---|---|
RetryProxy() |
| Modifier and Type | Method | Description |
|---|---|---|
static <T> java.lang.Object |
create(java.lang.Class<T> iface,
FailoverProxyProvider<T> proxyProvider,
java.util.Map<java.lang.String,RetryPolicy> methodNameToPolicyMap,
RetryPolicy defaultPolicy) |
Create a proxy for an interface of implementations of that interface using
the given
FailoverProxyProvider and the a set of retry policies
specified by method name. |
static <T> java.lang.Object |
create(java.lang.Class<T> iface,
FailoverProxyProvider<T> proxyProvider,
RetryPolicy retryPolicy) |
Create a proxy for an interface of implementations of that interface using
the given
FailoverProxyProvider and the same retry policy for each
method in the interface. |
static <T> java.lang.Object |
create(java.lang.Class<T> iface,
T implementation,
java.util.Map<java.lang.String,RetryPolicy> methodNameToPolicyMap) |
Create a proxy for an interface of an implementation class
using the a set of retry policies specified by method name.
|
static <T> java.lang.Object |
create(java.lang.Class<T> iface,
T implementation,
RetryPolicy retryPolicy) |
Create a proxy for an interface of an implementation class
using the same retry policy for each method in the interface.
|
public static <T> java.lang.Object create(java.lang.Class<T> iface,
T implementation,
RetryPolicy retryPolicy)
Create a proxy for an interface of an implementation class using the same retry policy for each method in the interface.
T - T.iface - the interface that the retry will implementimplementation - the instance whose methods should be retriedretryPolicy - the policy for retrying method call failurespublic static <T> java.lang.Object create(java.lang.Class<T> iface,
FailoverProxyProvider<T> proxyProvider,
RetryPolicy retryPolicy)
FailoverProxyProvider and the same retry policy for each
method in the interface.T - T.iface - the interface that the retry will implementproxyProvider - provides implementation instances whose methods should be retriedretryPolicy - the policy for retrying or failing over method call failurespublic static <T> java.lang.Object create(java.lang.Class<T> iface,
T implementation,
java.util.Map<java.lang.String,RetryPolicy> methodNameToPolicyMap)
RetryPolicies.TRY_ONCE_THEN_FAIL is used.T - T.iface - the interface that the retry will implementimplementation - the instance whose methods should be retriedmethodNameToPolicyMap - a map of method names to retry policiespublic static <T> java.lang.Object create(java.lang.Class<T> iface,
FailoverProxyProvider<T> proxyProvider,
java.util.Map<java.lang.String,RetryPolicy> methodNameToPolicyMap,
RetryPolicy defaultPolicy)
FailoverProxyProvider and the a set of retry policies
specified by method name. If no retry policy is defined for a method then a
default of RetryPolicies.TRY_ONCE_THEN_FAIL is used.T - T.iface - the interface that the retry will implementproxyProvider - provides implementation instances whose methods should be retriedmethodNameToPolicyMap - map of method names to retry policiesdefaultPolicy - defaultPolicy.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.