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.TimerTask
Timer task that sendsstatement.cancel()
signal to supportStatement.setQueryTimeout(int)
. We explicitly nullify the reference to statement to help GC sincejava.util.TimerThread
might keep reference to the latest executed task in its local variable.
-
-
Field Summary
Fields Modifier and Type Field Description private PgStatement
statement
-
Constructor Summary
Constructors Constructor Description StatementCancelTimerTask(PgStatement statement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel()
void
run()
-
-
-
Field Detail
-
statement
private PgStatement statement
-
-
Constructor Detail
-
StatementCancelTimerTask
StatementCancelTimerTask(PgStatement statement)
-
-