@InterfaceStability.Evolving public class ProtobufRpcEngine extends Object implements RpcEngine
Modifier and Type | Class and Description |
---|---|
static class |
ProtobufRpcEngine.RpcRequestMessageWrapper |
static class |
ProtobufRpcEngine.RpcResponseMessageWrapper |
static class |
ProtobufRpcEngine.RpcResponseWrapper
Wrapper for Protocol Buffer Responses
Note while this wrapper is writable, the request on the wire is in
Protobuf.
|
static class |
ProtobufRpcEngine.Server |
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
ProtobufRpcEngine() |
Modifier and Type | Method and Description |
---|---|
ProtocolProxy<ProtocolMetaInfoPB> |
getProtocolMetaInfoProxy(Client.ConnectionId connId,
Configuration conf,
SocketFactory factory)
Returns a proxy for ProtocolMetaInfoPB, which uses the given connection
id.
|
<T> ProtocolProxy<T> |
getProxy(Class<T> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout) |
<T> ProtocolProxy<T> |
getProxy(Class<T> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout,
RetryPolicy connectionRetryPolicy)
Construct a client-side proxy object.
|
RPC.Server |
getServer(Class<?> protocol,
Object protocolImpl,
String bindAddress,
int port,
int numHandlers,
int numReaders,
int queueSizePerHandler,
boolean verbose,
Configuration conf,
SecretManager<? extends TokenIdentifier> secretManager,
String portRangeConfig)
Construct a server for a protocol implementation instance.
|
public <T> ProtocolProxy<T> getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout) throws IOException
IOException
public <T> ProtocolProxy<T> getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy) throws IOException
RpcEngine
getProxy
in interface RpcEngine
IOException
public ProtocolProxy<ProtocolMetaInfoPB> getProtocolMetaInfoProxy(Client.ConnectionId connId, Configuration conf, SocketFactory factory) throws IOException
RpcEngine
getProtocolMetaInfoProxy
in interface RpcEngine
IOException
public RPC.Server getServer(Class<?> protocol, Object protocolImpl, String bindAddress, int port, int numHandlers, int numReaders, int queueSizePerHandler, boolean verbose, Configuration conf, SecretManager<? extends TokenIdentifier> secretManager, String portRangeConfig) throws IOException
RpcEngine
getServer
in interface RpcEngine
protocol
- the class of protocol to useprotocolImpl
- the instance of protocol whose methods will be calledbindAddress
- the address to bind on to listen for connectionport
- the port to listen for connections onnumHandlers
- the number of method handler threads to runnumReaders
- the number of reader threads to runqueueSizePerHandler
- the size of the queue per hander threadverbose
- whether each call should be loggedconf
- the configuration to usesecretManager
- The secret manager to use to validate incoming requests.portRangeConfig
- A config parameter that can be used to restrict
the range of ports used when port is 0 (an ephemeral port)IOException
- on any errorCopyright © 2013 Apache Software Foundation. All rights reserved.