public class DataSourceQueryCountListener extends Object implements QueryExecutionListener
QueryCount).
In web application lifecycle, one http request is handled by one thread. Storing database access information into a thread local value provides metrics information per http request.
Thread local value(QueryCount) holds following data:
QueryCount can be retrieved by QueryCountHolder.get(String).
QueryCount,
QueryCountHolder,
CommonsQueryCountLoggingServletFilter,
CommonsQueryCountLoggingRequestListener,
CommonsQueryCountLoggingHandlerInterceptorDEFAULT| Constructor and Description |
|---|
DataSourceQueryCountListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterQuery(ExecutionInfo execInfo,
List<QueryInfo> queryInfoList) |
void |
beforeQuery(ExecutionInfo execInfo,
List<QueryInfo> queryInfoList) |
public void beforeQuery(ExecutionInfo execInfo, List<QueryInfo> queryInfoList)
beforeQuery in interface QueryExecutionListenerpublic void afterQuery(ExecutionInfo execInfo, List<QueryInfo> queryInfoList)
afterQuery in interface QueryExecutionListenerCopyright © 2016. All rights reserved.