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 |
protected boolean |
writeIsolation |
executor, inExecution, stopwatchFactory, 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) |
void |
setWriteIsolation(boolean writeIsolation) |
protected abstract void |
writeLog(String message) |
afterQuery, beforeQuery, getExecutionInfoKey, getExecutor, getThreshold, getThresholdTimeUnit, setStopwatchFactory, setThreshold, setThresholdTimeUnit, setUseDaemonThreadprotected boolean writeDataSourceName
protected boolean writeConnectionId
protected boolean writeIsolation
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)
public void setWriteIsolation(boolean writeIsolation)
Copyright © 2024. All rights reserved.