org.apache.hadoop.hbase.coprocessor
Interface EndpointObserver

All Superinterfaces:
Coprocessor
All Known Implementing Classes:
AccessController

@InterfaceAudience.LimitedPrivate(value="Coprocesssor")
@InterfaceStability.Evolving
public interface EndpointObserver
extends Coprocessor

Coprocessors implement this interface to observe and mediate endpoint invocations on a region.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
 
Field Summary
 
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
 
Method Summary
 void postEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx, com.google.protobuf.Service service, String methodName, com.google.protobuf.Message request, com.google.protobuf.Message.Builder responseBuilder)
          Called after an Endpoint service method is invoked.
 com.google.protobuf.Message preEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx, com.google.protobuf.Service service, String methodName, com.google.protobuf.Message request)
          Called before an Endpoint service method is invoked.
 
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
start, stop
 

Method Detail

preEndpointInvocation

com.google.protobuf.Message preEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx,
                                                  com.google.protobuf.Service service,
                                                  String methodName,
                                                  com.google.protobuf.Message request)
                                                  throws IOException
Called before an Endpoint service method is invoked. The request message can be altered by returning a new instance. Throwing an exception will abort the invocation. Calling ObserverContext.bypass() has no effect in this hook.

Parameters:
ctx - the environment provided by the region server
service - the endpoint service
methodName - the invoked service method
request - the request message
Returns:
the possibly modified message
Throws:
IOException

postEndpointInvocation

void postEndpointInvocation(ObserverContext<RegionCoprocessorEnvironment> ctx,
                            com.google.protobuf.Service service,
                            String methodName,
                            com.google.protobuf.Message request,
                            com.google.protobuf.Message.Builder responseBuilder)
                            throws IOException
Called after an Endpoint service method is invoked. The response message can be altered using the builder.

Parameters:
ctx - the environment provided by the region server
service - the endpoint service
methodName - the invoked service method
request - the request message
responseBuilder - the response message builder
Throws:
IOException


Copyright © 2015 The Apache Software Foundation. All rights reserved.