org.apache.hadoop.hbase.ipc
Interface VersionedProtocol

All Known Subinterfaces:
AccessControllerProtocol, AggregateProtocol, AuthenticationProtocol, BulkDeleteProtocol, CoprocessorProtocol, HMasterInterface, HMasterRegionInterface, HRegionInterface, MultiRowMutationProtocol, SecureBulkLoadProtocol
All Known Implementing Classes:
AccessController, AggregateImplementation, BaseEndpointCoprocessor, BulkDeleteEndpoint, HMaster, HMasterCommandLine.LocalHMaster, HRegionServer, MultiRowMutationEndpoint, SecureBulkLoadEndpoint, TokenProvider

public interface VersionedProtocol

Superclass of all protocols that use Hadoop RPC. Subclasses of this interface are also supposed to have a static final long versionID field.


Method Summary
 ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash)
          Return protocol version corresponding to protocol interface.
 long getProtocolVersion(String protocol, long clientVersion)
          Deprecated. 
 

Method Detail

getProtocolVersion

@Deprecated
long getProtocolVersion(String protocol,
                                   long clientVersion)
                        throws IOException
Deprecated. 

Return protocol version corresponding to protocol interface.

Parameters:
protocol - The classname of the protocol interface
clientVersion - The version of the protocol that the client speaks
Returns:
the version that the server will speak
Throws:
IOException - if any IO error occurs

getProtocolSignature

ProtocolSignature getProtocolSignature(String protocol,
                                       long clientVersion,
                                       int clientMethodsHash)
                                       throws IOException
Return protocol version corresponding to protocol interface.

Parameters:
protocol - The classname of the protocol interface
clientVersion - The version of the protocol that the client speaks
clientMethodsHash - the hashcode of client protocol methods
Returns:
the server protocol signature containing its version and a list of its supported methods
Throws:
IOException
See Also:
for a default implementation


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.