| Constructor | Description |
|---|---|
ProtocolSignature() |
default constructor
|
ProtocolSignature(long version,
int[] methodHashcodes) |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
int[] |
getMethods() |
|
static ProtocolSignature |
getProtocolSignature(int clientMethodsHashCode,
long serverVersion,
java.lang.Class<? extends VersionedProtocol> protocol) |
Get a server protocol's signature
|
static ProtocolSignature |
getProtocolSignature(java.lang.String protocolName,
long version) |
|
static ProtocolSignature |
getProtocolSignature(VersionedProtocol server,
java.lang.String protocol,
long clientVersion,
int clientMethodsHash) |
Get a server protocol's signature
|
long |
getVersion() |
|
void |
readFields(java.io.DataInput in) |
Deserialize the fields of this object from
in. |
static void |
resetCache() |
|
void |
write(java.io.DataOutput out) |
Serialize the fields of this object to
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(java.io.DataInput in)
throws java.io.IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Writablein - DataInput to deseriablize this object from.java.io.IOException - any other problem for readFields.public void write(java.io.DataOutput out)
throws java.io.IOException
Writableout.@VisibleForTesting public static void resetCache()
public static ProtocolSignature getProtocolSignature(int clientMethodsHashCode, long serverVersion, java.lang.Class<? extends VersionedProtocol> protocol)
clientMethodsHashCode - client protocol methods hashcodeserverVersion - server protocol versionprotocol - protocolpublic static ProtocolSignature getProtocolSignature(java.lang.String protocolName, long version) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic static ProtocolSignature getProtocolSignature(VersionedProtocol server, java.lang.String protocol, long clientVersion, int clientMethodsHash) throws java.io.IOException
server - server implementationprotocol - server protocolclientVersion - client's versionclientMethodsHash - client's protocol's hash codejava.io.IOException - if any error occursCopyright © 2008–2025 Apache Software Foundation. All rights reserved.