public class SingleUseClientProvider extends AbstractClientProvider
AbstractClientProvider.EndpointStrategy, AbstractClientProvider.RandomEndpointStrategy, AbstractClientProvider.TimeLimitEndpointStrategyinitialized| Constructor and Description |
|---|
SingleUseClientProvider(org.apache.hadoop.conf.Configuration conf,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient,
int timeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
discardClient(TransactionServiceThriftClient client)
Discard an tx client from the provider's pool.
|
TransactionServiceThriftClient |
getClient()
Retrieve an tx client for exclusive use by the current thread.
|
void |
returnClient(TransactionServiceThriftClient client)
Release an tx client back to the provider's pool.
|
String |
toString() |
initialize, newClient, newClientpublic SingleUseClientProvider(org.apache.hadoop.conf.Configuration conf,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient,
int timeout)
public TransactionServiceThriftClient getClient() throws org.apache.thrift.TException
ThriftClientProviderorg.apache.thrift.TExceptionpublic void returnClient(TransactionServiceThriftClient client)
ThriftClientProviderclient - The client to releasepublic void discardClient(TransactionServiceThriftClient client)
ThriftClientProviderclient - The client to discardCopyright © 2015. All Rights Reserved.