Class StatementLeakDetector


  • public class StatementLeakDetector
    extends Object
    Statement leak detector that prints the stack trace of the thread when a statement object is leaked. Once the leak timeout expires, a statement leak is assumed and the caller stack trace is printed. When statement-leak-reclaim is set to true, the statement object is reclaimed.
    Author:
    Shalini M
    • Constructor Detail

      • StatementLeakDetector

        public StatementLeakDetector​(PoolInfo poolInfo,
                                     boolean leakTracing,
                                     long leakTimeoutInMillis,
                                     boolean leakReclaim,
                                     Timer timer)
    • Method Detail

      • reset

        public void reset​(boolean leakTracing,
                          long leakTimeoutInMillis,
                          boolean leakReclaim)
      • startStatementLeakTracing

        public void startStatementLeakTracing​(Statement stmt,
                                              StatementLeakListener listener)
        Starts statement leak tracing
        Parameters:
        stmt - Statement which needs to be traced
        listener - Leak Listener
      • stopStatementLeakTracing

        public void stopStatementLeakTracing​(Statement stmt,
                                             StatementLeakListener listener)
        Stops statement leak tracing
        Parameters:
        stmt - Statement which needs to be traced
        listener - Leak Listener
      • clearAllStatementLeakTasks

        public void clearAllStatementLeakTasks()
        Clear all statement leak tracing tasks in case of statement leak tracing being turned off