public class ConfiguredFailoverProxyProvider<T> extends Object implements FailoverProxyProvider<T>
| Constructor and Description |
|---|
ConfiguredFailoverProxyProvider(Configuration conf,
URI uri,
Class<T> xface) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close all the proxy objects which have been opened over the lifetime of
this proxy provider.
|
Class<T> |
getInterface()
Return a reference to the interface this provider's proxy objects actually
implement.
|
T |
getProxy()
Lazily initialize the RPC proxy object.
|
void |
performFailover(T currentProxy)
Called whenever the associated
RetryPolicy determines that an error
warrants failing over. |
public ConfiguredFailoverProxyProvider(Configuration conf, URI uri, Class<T> xface)
public Class<T> getInterface()
FailoverProxyProviderIdempotent 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.getInterface in interface FailoverProxyProvider<T>FailoverProxyProvider.getProxy()public T getProxy()
getProxy in interface FailoverProxyProvider<T>public void performFailover(T currentProxy)
FailoverProxyProviderRetryPolicy determines that an error
warrants failing over.performFailover in interface FailoverProxyProvider<T>currentProxy - the proxy object which was being used before this
failover eventpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.