protected void queryTimerEnd ( String sql , long queryStartTime ) { if ( ( this . queryExecuteTimeLimit != 0 ) && ( this . connectionHook != null ) ) { long timeElapsed = ( System . nanoTime ( ) - queryStartTime ) ; if ( timeElapsed > this . queryExecuteTimeLimit ) { this . connectionHook . onQueryExecuteTimeLimitExceeded ( this . connectionHandle , this , sql , this . logParams , timeElapsed ) ; } } if ( this . statisticsEnabled ) { this . statistics . incrementStatementsExecuted ( ) ; this . statistics . addStatementExecuteTime ( System . nanoTime ( ) - queryStartTime ) ; } }
Call the onQueryExecuteTimeLimitExceeded hook if necessary