public class RetryProxy extends Object
A factory for creating retry proxies.
构造器和说明 |
---|
RetryProxy() |
限定符和类型 | 方法和说明 |
---|---|
static Object |
create(Class<?> iface,
Object implementation,
Map<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 Object |
create(Class<?> iface,
Object implementation,
RetryPolicy retryPolicy)
Create a proxy for an interface of an implementation class
using the same retry policy for each method in the interface.
|
static Object |
create(Class<?> iface,
Object implementation,
RetryPolicy defaultPolicy,
Map<String,RetryPolicy> methodNameToPolicyMap) |
public static Object create(Class<?> iface, Object implementation, RetryPolicy retryPolicy)
Create a proxy for an interface of an implementation class using the same retry policy for each method in the interface.
iface
- the interface that the retry will implementimplementation
- the instance whose methods should be retriedretryPolicy
- the policy for retirying method call failurespublic static Object create(Class<?> iface, Object implementation, Map<String,RetryPolicy> methodNameToPolicyMap)
Create a proxy for an interface of an implementation class
using 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.
iface
- the interface that the retry will implementimplementation
- the instance whose methods should be retriedmethodNameToPolicyMap
- a map of method names to retry policiespublic static Object create(Class<?> iface, Object implementation, RetryPolicy defaultPolicy, Map<String,RetryPolicy> methodNameToPolicyMap)
Copyright © 2009 The Apache Software Foundation