public class RPC extends Object
限定符和类型 | 类和说明 |
---|---|
static class |
RPC.Server
An RPC Server.
|
static class |
RPC.VersionMismatch
A version mismatch for the RPC protocol.
|
限定符和类型 | 方法和说明 |
---|---|
static Object[] |
call(Method method,
Object[][] params,
InetSocketAddress[] addrs,
Configuration conf)
|
static Object[] |
call(Method method,
Object[][] params,
InetSocketAddress[] addrs,
UserGroupInformation ticket,
Configuration conf)
Expert: Make multiple, parallel calls to a set of servers.
|
static void |
checkVersion(Class<? extends VersionedProtocol> protocol,
long clientVersion,
VersionedProtocol proxy)
Get server version and then compare it with client version.
|
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
Configuration conf)
Construct a client-side proxy object with the default SocketFactory
|
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
Configuration conf,
int rpcTimeout) |
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
Configuration conf,
SocketFactory factory)
Construct a client-side proxy object that implements the named protocol,
talking to a server at the named address.
|
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
Configuration conf,
SocketFactory factory,
int rpcTimeout)
Construct a client-side proxy object that implements the named protocol,
talking to a server at the named address.
|
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory)
Construct a client-side proxy object that implements the named protocol,
talking to a server at the named address.
|
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout)
Construct a client-side proxy object that implements the named protocol,
talking to a server at the named address.
|
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout,
RetryPolicy connectionRetryPolicy,
boolean checkVersion)
Construct a client-side proxy object that implements the named protocol,
talking to a server at the named address.
|
static RPC.Server |
getServer(Object instance,
String bindAddress,
int port,
Configuration conf)
Construct a server for a protocol implementation instance listening on a
port and address.
|
static RPC.Server |
getServer(Object instance,
String bindAddress,
int port,
int numHandlers,
boolean verbose,
Configuration conf)
Construct a server for a protocol implementation instance listening on a
port and address.
|
static RPC.Server |
getServer(Object instance,
String bindAddress,
int port,
int numHandlers,
boolean verbose,
Configuration conf,
SecretManager<? extends TokenIdentifier> secretManager)
Construct a server for a protocol implementation instance listening on a
port and address, with a secret manager.
|
static void |
stopProxy(VersionedProtocol proxy)
Stop this proxy and release its invoker's resource
|
static VersionedProtocol |
waitForProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
Configuration conf) |
public static VersionedProtocol waitForProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, Configuration conf) throws IOException
IOException
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, SocketFactory factory) throws IOException
IOException
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, SocketFactory factory, int rpcTimeout) throws IOException
IOException
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory) throws IOException
IOException
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout) throws IOException
IOException
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, boolean checkVersion) throws IOException
IOException
public static void checkVersion(Class<? extends VersionedProtocol> protocol, long clientVersion, VersionedProtocol proxy) throws IOException
IOException
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, Configuration conf) throws IOException
protocol
- clientVersion
- addr
- conf
- IOException
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, int rpcTimeout) throws IOException
IOException
public static void stopProxy(VersionedProtocol proxy)
proxy
- the proxy to be stoppedpublic static Object[] call(Method method, Object[][] params, InetSocketAddress[] addrs, Configuration conf) throws IOException, InterruptedException
public static Object[] call(Method method, Object[][] params, InetSocketAddress[] addrs, UserGroupInformation ticket, Configuration conf) throws IOException, InterruptedException
public static RPC.Server getServer(Object instance, String bindAddress, int port, Configuration conf) throws IOException
IOException
public static RPC.Server getServer(Object instance, String bindAddress, int port, int numHandlers, boolean verbose, Configuration conf) throws IOException
IOException
public static RPC.Server getServer(Object instance, String bindAddress, int port, int numHandlers, boolean verbose, Configuration conf, SecretManager<? extends TokenIdentifier> secretManager) throws IOException
IOException
Copyright © 2009 The Apache Software Foundation