Class StatementCancelTimerTask

  • All Implemented Interfaces:
    java.lang.Runnable

    class StatementCancelTimerTask
    extends java.util.TimerTask
    Timer task that sends statement.cancel() signal to support Statement.setQueryTimeout(int). We explicitly nullify the reference to statement to help GC since java.util.TimerThread might keep reference to the latest executed task in its local variable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel()  
      void run()  
      • Methods inherited from class java.util.TimerTask

        scheduledExecutionTime
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StatementCancelTimerTask

        StatementCancelTimerTask​(PgStatement statement)
    • Method Detail

      • cancel

        public boolean cancel()
        Overrides:
        cancel in class java.util.TimerTask
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in class java.util.TimerTask