public abstract class BaseEndpointCoprocessor extends Object implements Coprocessor, CoprocessorProtocol, VersionedProtocol
Coprocessor.State
Modifier and Type | Field and Description |
---|---|
static long |
VERSION
This Interfaces' version.
|
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER
Constructor and Description |
---|
BaseEndpointCoprocessor() |
Modifier and Type | Method and Description |
---|---|
CoprocessorEnvironment |
getEnvironment() |
ProtocolSignature |
getProtocolSignature(String protocol,
long version,
int clientMethodsHashCode)
Return protocol version corresponding to protocol interface.
|
long |
getProtocolVersion(String protocol,
long clientVersion)
Return protocol version corresponding to protocol interface.
|
void |
start(CoprocessorEnvironment env) |
void |
stop(CoprocessorEnvironment env) |
public static final long VERSION
public CoprocessorEnvironment getEnvironment()
public void start(CoprocessorEnvironment env)
start
in interface Coprocessor
public void stop(CoprocessorEnvironment env)
stop
in interface Coprocessor
public ProtocolSignature getProtocolSignature(String protocol, long version, int clientMethodsHashCode) throws IOException
VersionedProtocol
getProtocolSignature
in interface VersionedProtocol
protocol
- The classname of the protocol interfaceversion
- The version of the protocol that the client speaksclientMethodsHashCode
- the hashcode of client protocol methodsIOException
for a default implementation
public long getProtocolVersion(String protocol, long clientVersion) throws IOException
VersionedProtocol
getProtocolVersion
in interface VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speaksIOException
- if any IO error occursCopyright © 2014 The Apache Software Foundation. All Rights Reserved.