public class MongoDBMethodInterceptor extends Object implements InstanceMethodsAroundInterceptor, InstanceConstructorInterceptor
MongoDBMethodInterceptor intercept method of Mongo.execute(ReadOperation, ReadPreference)
or Mongo.execute(WriteOperation). record the mongoDB host, operation name and the key of the
operation.| Constructor and Description |
|---|
MongoDBMethodInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
Object |
afterMethod(EnhancedInstance objInst,
Method method,
Object[] allArguments,
Class<?>[] argumentsTypes,
Object ret) |
void |
beforeMethod(EnhancedInstance objInst,
Method method,
Object[] allArguments,
Class<?>[] argumentsTypes,
MethodInterceptResult result) |
void |
handleMethodException(EnhancedInstance objInst,
Method method,
Object[] allArguments,
Class<?>[] argumentsTypes,
Throwable t) |
void |
onConstruct(EnhancedInstance objInst,
Object[] allArguments) |
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable
beforeMethod in interface InstanceMethodsAroundInterceptorThrowablepublic Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) throws Throwable
afterMethod in interface InstanceMethodsAroundInterceptorThrowablepublic void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t)
handleMethodException in interface InstanceMethodsAroundInterceptorpublic void onConstruct(EnhancedInstance objInst, Object[] allArguments)
onConstruct in interface InstanceConstructorInterceptorCopyright © 2018 The Apache Software Foundation. All rights reserved.