@LimitedPrivate({"HDFS","MapReduce"})
@Evolving
public class ClientCache
extends java.lang.Object
| Constructor | Description |
|---|---|
ClientCache() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clearCache() |
|
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,
javax.net.SocketFactory factory) |
Construct & cache an IPC client with the user-provided SocketFactory
if no cached client exists.
|
Client |
getClient(Configuration conf,
javax.net.SocketFactory factory,
java.lang.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, javax.net.SocketFactory factory, java.lang.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, javax.net.SocketFactory factory)
conf - Configurationfactory - SocketFactory for client socketpublic void stopClient(Client client)
client - input client.@VisibleForTesting public void clearCache()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.