statement.cancel() signal to support java.sql.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.
| Modifier and Type | Field and Description |
|---|---|
| private @Nullable PgStatement |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public void | run()
Implements abstract java. Implements java. The action to be performed by this timer task. |
| statement | back to summary |
|---|---|
| private @Nullable PgStatement statement | |
| StatementCancelTimerTask | back to summary |
|---|---|
| pack-priv StatementCancelTimerTask(PgStatement statement) | |
| cancel | back to summary |
|---|---|
| public boolean cancel() Overrides java. Doc from java. Cancels this timer task. If the task has been scheduled for one-time execution and has not yet run, or has not yet been scheduled, it will never run. If the task has been scheduled for repeated execution, it will never run again. (If the task is running when this call occurs, the task will run to completion, but will never run again.) Note that calling this method from within the This method may be called repeatedly; the second and subsequent calls have no effect.
| |
| run | back to summary |
|---|---|
| public void run() Implements abstract java. Implements java. Doc from java. The action to be performed by this timer task.
| |