public abstract class AbstractClientProvider extends Object implements ThriftClientProvider
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractClientProvider.EndpointStrategy
This class helps picking up an endpoint from a list of Discoverable.
|
class |
AbstractClientProvider.RandomEndpointStrategy
Randomly picks endpoint from the list of available endpoints.
|
class |
AbstractClientProvider.TimeLimitEndpointStrategy
An
AbstractClientProvider.EndpointStrategy that make sure it picks an endpoint within the given
timeout limit. |
| Modifier and Type | Field and Description |
|---|---|
protected AtomicBoolean |
initialized |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractClientProvider(org.apache.hadoop.conf.Configuration configuration,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize()
Initialize the provider.
|
protected TransactionServiceThriftClient |
newClient() |
protected TransactionServiceThriftClient |
newClient(int timeout) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCloseableClient, returnClientprotected final AtomicBoolean initialized
protected AbstractClientProvider(org.apache.hadoop.conf.Configuration configuration,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient)
public void initialize()
throws org.apache.thrift.TException
ThriftClientProviderinitialize in interface ThriftClientProviderorg.apache.thrift.TExceptionprotected TransactionServiceThriftClient newClient() throws org.apache.thrift.TException
org.apache.thrift.TExceptionprotected TransactionServiceThriftClient newClient(int timeout) throws org.apache.thrift.TException
org.apache.thrift.TExceptionCopyright © 2016 The Apache Software Foundation. All rights reserved.