@InterfaceStability.Evolving public interface FailoverProxyProvider<T> extends Closeable
RetryPolicy
.Modifier and Type | Method and Description |
---|---|
Class<T> |
getInterface()
Return a reference to the interface this provider's proxy objects actually
implement.
|
T |
getProxy()
Get the proxy object which should be used until the next failover event
occurs.
|
void |
performFailover(T currentProxy)
Called whenever the associated
RetryPolicy determines that an error
warrants failing over. |
T getProxy()
void performFailover(T currentProxy)
RetryPolicy
determines that an error
warrants failing over.currentProxy
- the proxy object which was being used before this
failover eventClass<T> getInterface()
Idempotent
or AtMostOnce
, then this fact will be passed to
the RetryPolicy.shouldRetry(Exception, int, int, boolean)
method on
error, for use in determining whether or not failover should be attempted.getProxy()
Copyright © 2013 Apache Software Foundation. All rights reserved.