public abstract class AbstractSlowQueryLoggingListener extends SlowQueryListener
SlowQueryListener.RunningQueryContext| Modifier and Type | Field and Description |
|---|---|
protected String |
prefix |
protected QueryLogEntryCreator |
queryLogEntryCreator |
protected boolean |
writeConnectionId |
protected boolean |
writeDataSourceName |
executor, inExecution, threshold, thresholdTimeUnit, useDaemonThreadDEFAULT| Constructor and Description |
|---|
AbstractSlowQueryLoggingListener() |
| Modifier and Type | Method and Description |
|---|---|
QueryLogEntryCreator |
getQueryLogEntryCreator() |
protected void |
onSlowQuery(ExecutionInfo execInfo,
List<QueryInfo> queryInfoList,
long startTimeInMills)
Callback when query execution time exceeds the threshold.
|
void |
setQueryLogEntryCreator(QueryLogEntryCreator queryLogEntryCreator) |
void |
setWriteConnectionId(boolean writeConnectionId) |
void |
setWriteDataSourceName(boolean writeDataSourceName) |
protected abstract void |
writeLog(String message) |
afterQuery, beforeQuery, getExecutionInfoKey, getExecutor, getThreshold, getThresholdTimeUnit, setThreshold, setThresholdTimeUnit, setUseDaemonThreadprotected boolean writeDataSourceName
protected boolean writeConnectionId
protected QueryLogEntryCreator queryLogEntryCreator
protected String prefix
protected void onSlowQuery(ExecutionInfo execInfo, List<QueryInfo> queryInfoList, long startTimeInMills)
SlowQueryListeneronSlowQuery in class SlowQueryListenerexecInfo - query execution infoqueryInfoList - query parameter infostartTimeInMills - time in mills when the query startedprotected abstract void writeLog(String message)
public void setQueryLogEntryCreator(QueryLogEntryCreator queryLogEntryCreator)
public QueryLogEntryCreator getQueryLogEntryCreator()
public void setWriteDataSourceName(boolean writeDataSourceName)
public void setWriteConnectionId(boolean writeConnectionId)
Copyright © 2019. All rights reserved.