public class ProtocolSignature extends Object implements org.apache.hadoop.io.Writable
Constructor and Description |
---|
ProtocolSignature()
default constructor
|
ProtocolSignature(long version,
int[] methodHashcodes)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int[] |
getMethods() |
static ProtocolSignature |
getProtocolSignature(VersionedProtocol server,
String protocol,
long clientVersion,
int clientMethodsHash)
Get a server protocol's signature
|
long |
getVersion() |
void |
readFields(DataInput in) |
void |
write(DataOutput out) |
public ProtocolSignature()
public ProtocolSignature(long version, int[] methodHashcodes)
version
- server versionmethodHashcodes
- hash codes of the methods supported by serverpublic long getVersion()
public int[] getMethods()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public static ProtocolSignature getProtocolSignature(VersionedProtocol server, String protocol, long clientVersion, int clientMethodsHash) throws IOException
server
- server implementationprotocol
- server protocolclientVersion
- client's versionclientMethodsHash
- client's protocol's hash codeIOException
- if any error occursCopyright © 2014 The Apache Software Foundation. All Rights Reserved.