Package org.postgresql.jdbc
Class StatementCancelTimerTask
- java.lang.Object
-
- java.util.TimerTask
-
- org.postgresql.jdbc.StatementCancelTimerTask
-
- All Implemented Interfaces:
java.lang.Runnable
class StatementCancelTimerTask extends java.util.TimerTaskTimer task that sendsstatement.cancel()signal to supportStatement.setQueryTimeout(int). We explicitly nullify the reference to statement to help GC sincejava.util.TimerThreadmight keep reference to the latest executed task in its local variable.
-
-
Field Summary
Fields Modifier and Type Field Description private PgStatementstatement
-
Constructor Summary
Constructors Constructor Description StatementCancelTimerTask(PgStatement statement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()voidrun()
-
-
-
Field Detail
-
statement
private PgStatement statement
-
-
Constructor Detail
-
StatementCancelTimerTask
StatementCancelTimerTask(PgStatement statement)
-
-