public class PooledClientProvider extends AbstractClientProvider
AbstractClientProvider.EndpointStrategy, AbstractClientProvider.RandomEndpointStrategy, AbstractClientProvider.TimeLimitEndpointStrategyinitialized| Constructor and Description |
|---|
PooledClientProvider(org.apache.hadoop.conf.Configuration conf,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient) |
| Modifier and Type | Method and Description |
|---|---|
CloseableThriftClient |
getCloseableClient()
Retrieve an AutoCloseable wrapper around tx client for exclusive use by the
current thread.
|
void |
returnClient(TransactionServiceThriftClient client)
Release an tx client back to the provider's pool, if the client is valid.
|
String |
toString() |
initialize, newClient, newClientpublic PooledClientProvider(org.apache.hadoop.conf.Configuration conf,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient)
public CloseableThriftClient getCloseableClient() throws org.apache.thrift.TException, TimeoutException, InterruptedException
ThriftClientProviderorg.apache.thrift.TExceptionTimeoutExceptionInterruptedExceptionpublic void returnClient(TransactionServiceThriftClient client)
ThriftClientProviderclient - The client to returnCopyright © 2016 The Apache Software Foundation. All rights reserved.