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.
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 serverservice
- the endpoint servicemethodName
- the invoked service methodrequest
- 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 serverservice
- the endpoint servicemethodName
- the invoked service methodrequest
- the request messageresponseBuilder
- the response message builder
- Throws:
IOException
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.