Top Description Fields Constructors Methods
com.mysql.cj

public Class CancelQueryTaskImpl

extends TimerTask
implements CancelQueryTask
Class Inheritance
All Implemented Interfaces
com.mysql.cj.CancelQueryTask
Imports
java.util.TimerTask, com.mysql.cj.Query.CancelStatus, com.mysql.cj.conf.HostInfo, .PropertyKey, com.mysql.cj.exceptions.OperationCancelledException, com.mysql.cj.protocol.a.NativeMessageBuilder, com.mysql.cj.telemetry.TelemetryAttribute, .TelemetryScope, .TelemetrySpan, .TelemetrySpanName

Thread used to implement query timeouts...Eventually we could be more efficient and have one thread with timers, but this is a straightforward and simple way to implement a feature that isn't used all that often.

Field Summary

Modifier and TypeField and Description
pack-priv Throwable
pack-priv boolean
pack-priv Query

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
cancel()

Overrides java.util.TimerTask.cancel.

Implements com.mysql.cj.CancelQueryTask.cancel.

Cancels this timer task.

public Throwable
public Query
public void
run()

Implements abstract java.util.TimerTask.run.

Implements java.lang.Runnable.run.

The action to be performed by this timer task.

public void
public void
Inherited from java.util.TimerTask:
scheduledExecutionTime

Field Detail

caughtWhileCancellingback to summary
pack-priv Throwable caughtWhileCancelling
queryTimeoutKillsConnectionback to summary
pack-priv boolean queryTimeoutKillsConnection
queryToCancelback to summary
pack-priv Query queryToCancel

Constructor Detail

CancelQueryTaskImplback to summary
public CancelQueryTaskImpl(Query cancellee)

Method Detail

cancelback to summary
public boolean cancel()

Overrides java.util.TimerTask.cancel.

Implements com.mysql.cj.CancelQueryTask.cancel.

Doc from java.util.TimerTask.cancel.

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 run method of a repeating timer task absolutely guarantees that the timer task will not run again.

This method may be called repeatedly; the second and subsequent calls have no effect.

Returns:boolean

true if this task is scheduled for one-time execution and has not yet run, or this task is scheduled for repeated execution. Returns false if the task was scheduled for one-time execution and has already run, or if the task was never scheduled, or if the task was already cancelled. (Loosely speaking, this method returns true if it prevents one or more scheduled executions from taking place.)

Annotations
@Override
getCaughtWhileCancellingback to summary
public Throwable getCaughtWhileCancelling()

Implements com.mysql.cj.CancelQueryTask.getCaughtWhileCancelling.

Annotations
@Override
getQueryToCancelback to summary
public Query getQueryToCancel()

Implements com.mysql.cj.CancelQueryTask.getQueryToCancel.

Annotations
@Override
runback to summary
public void run()

Implements abstract java.util.TimerTask.run.

Implements java.lang.Runnable.run.

Doc from java.util.TimerTask.run.

The action to be performed by this timer task.

Annotations
@Override
setCaughtWhileCancellingback to summary
public void setCaughtWhileCancelling(Throwable caughtWhileCancelling)

Implements com.mysql.cj.CancelQueryTask.setCaughtWhileCancelling.

Annotations
@Override
setQueryToCancelback to summary
public void setQueryToCancel(Query queryToCancel)

Implements com.mysql.cj.CancelQueryTask.setQueryToCancel.

Annotations
@Override