Class SlowSqlListener

  • All Implemented Interfaces:
    java.io.Serializable , java.util.EventListener , org.jooq.ExecuteListener

    
    public class SlowSqlListener
     implements ExecuteListener
                        

    Log the Slow Sql

    Since:

    2021-01-14

    Author:

    trydofor

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getToken()
      void setToken(String token)
      long getThresholdMillis() threshold of slow in mills, `-1` means disable
      void setThresholdMillis(long thresholdMillis) threshold of slow in mills, `-1` means disable
      BiConsumer<Long, String> getCostAndSqlConsumer() Handle time-consuming and SQL instead of logger
      void setCostAndSqlConsumer(BiConsumer<Long, String> costAndSqlConsumer) Handle time-consuming and SQL instead of logger
      void start(ExecuteContext ctx)
      void end(ExecuteContext ctx)
      • Methods inherited from class org.jooq.ExecuteListener

        bindEnd, bindStart, exception, executeEnd, executeStart, fetchEnd, fetchStart, onBindEnd, onBindStart, onEnd, onException, onExecuteEnd, onExecuteStart, onFetchEnd, onFetchStart, onOutEnd, onOutStart, onPrepareEnd, onPrepareStart, onRecordEnd, onRecordStart, onRenderEnd, onRenderStart, onResultEnd, onResultStart, onStart, onWarning, outEnd, outStart, prepareEnd, prepareStart, recordEnd, recordStart, renderEnd, renderStart, resultEnd, resultStart, warning
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait