org.apache.hadoop.hbase.ipc
Class ProtocolSignature
java.lang.Object
org.apache.hadoop.hbase.ipc.ProtocolSignature
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public class ProtocolSignature
- extends Object
- implements org.apache.hadoop.io.Writable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProtocolSignature
public ProtocolSignature()
- default constructor
ProtocolSignature
public ProtocolSignature(long version,
int[] methodHashcodes)
- Constructor
- Parameters:
version
- server versionmethodHashcodes
- hash codes of the methods supported by server
getVersion
public long getVersion()
getMethods
public int[] getMethods()
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
getProtocolSignature
public static ProtocolSignature getProtocolSignature(VersionedProtocol server,
String protocol,
long clientVersion,
int clientMethodsHash)
throws IOException
- Get a server protocol's signature
- Parameters:
server
- server implementationprotocol
- server protocolclientVersion
- client's versionclientMethodsHash
- client's protocol's hash code
- Returns:
- the server protocol's signature
- Throws:
IOException
- if any error occurs
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.