Package fish.payara.jdbc
Class SlowSQLLogger
- java.lang.Object
-
- fish.payara.jdbc.SlowSQLLogger
-
- All Implemented Interfaces:
SQLTraceListener
public class SlowSQLLogger extends Object implements SQLTraceListener
Logs a message when it detects that a SQL query is slow.- Author:
- steve
-
-
Constructor Summary
Constructors Constructor Description SlowSQLLogger()
SlowSQLLogger(long threshold, TimeUnit unit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getThreshold()
void
setThreshold(long threshold)
void
sqlTrace(SQLTraceRecord record)
Notify listeners with SQL trace information.
-
-
-
Constructor Detail
-
SlowSQLLogger
public SlowSQLLogger(long threshold, TimeUnit unit)
-
SlowSQLLogger
public SlowSQLLogger()
-
-
Method Detail
-
getThreshold
public long getThreshold()
-
setThreshold
public void setThreshold(long threshold)
-
sqlTrace
public void sqlTrace(SQLTraceRecord record)
Description copied from interface:SQLTraceListener
Notify listeners with SQL trace information.- Specified by:
sqlTrace
in interfaceSQLTraceListener
- Parameters:
record
- SQLTraceRecord that has information related to the SQL operation
-
-