@Override public Object invoke(final MethodInvocation invocation) throws Throwable { final WithProfilingCallback<Object, Throwable> callback = new WithProfilingCallback<Object, Throwable>() { @Override public Object execute() throws Throwable { logger.debug("Entering API call {}, arguments: {}", invocation.getMethod(), invocation.getArguments()); final Object proceed = invocation.proceed(); logger.debug("Exiting API call {}, returning: {}", invocation.getMethod(), proceed); return proceed; } }; if (forcedRODBI(invocation)) { return prof.executeWithProfiling(ProfilingFeatureType.API, invocation.getMethod().getName(), new WithProfilingCallback<Object, Throwable>() { @Override public Object execute() throws Throwable { return DBRouterUntyped.withRODBIAllowed(true, callback); } }); } else { return prof.executeWithProfiling(ProfilingFeatureType.API, invocation.getMethod().getName(), callback); } }
@Override public Object invoke(final MethodInvocation invocation) throws Throwable { final WithProfilingCallback<Object, Throwable> callback = new WithProfilingCallback<Object, Throwable>() { @Override public Object execute() throws Throwable { logger.debug("Entering API call {}, arguments: {}", invocation.getMethod(), invocation.getArguments()); final Object proceed = invocation.proceed(); logger.debug("Exiting API call {}, returning: {}", invocation.getMethod(), proceed); return proceed; } }; if (forcedRODBI(invocation)) { return prof.executeWithProfiling(ProfilingFeatureType.API, invocation.getMethod().getName(), new WithProfilingCallback<Object, Throwable>() { @Override public Object execute() throws Throwable { return DBRouterUntyped.withRODBIAllowed(true, callback); } }); } else { return prof.executeWithProfiling(ProfilingFeatureType.API, invocation.getMethod().getName(), callback); } }