@InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) @InterfaceStability.Evolving public class ClientCache extends Object
Constructor and Description |
---|
ClientCache() |
Modifier and Type | Method and Description |
---|---|
Client |
getClient(Configuration conf)
Construct & cache an IPC client with the default SocketFactory
and default valueClass if no cached client exists.
|
Client |
getClient(Configuration conf,
SocketFactory factory)
Construct & cache an IPC client with the user-provided SocketFactory
if no cached client exists.
|
Client |
getClient(Configuration conf,
SocketFactory factory,
Class<? extends Writable> valueClass)
Construct & cache an IPC client with the user-provided SocketFactory
if no cached client exists.
|
void |
stopClient(Client client)
Stop a RPC client connection
A RPC client is closed only when its reference count becomes zero.
|
public Client getClient(Configuration conf, SocketFactory factory, Class<? extends Writable> valueClass)
conf
- Configurationfactory
- SocketFactory for client socketvalueClass
- Class of the expected responsepublic Client getClient(Configuration conf)
conf
- Configurationpublic Client getClient(Configuration conf, SocketFactory factory)
conf
- Configurationfactory
- SocketFactory for client socketpublic void stopClient(Client client)
Copyright © 2013 Apache Software Foundation. All rights reserved.