Package com.mysql.cj
Class CancelQueryTaskImpl
java.lang.Object
java.util.TimerTask
com.mysql.cj.CancelQueryTaskImpl
- All Implemented Interfaces:
CancelQueryTask
,java.lang.Runnable
public class CancelQueryTaskImpl extends java.util.TimerTask implements CancelQueryTask
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.
-
Constructor Summary
Constructors Constructor Description CancelQueryTaskImpl(Query cancellee)
-
Method Summary
Modifier and Type Method Description boolean
cancel()
java.lang.Throwable
getCaughtWhileCancelling()
Query
getQueryToCancel()
void
run()
void
setCaughtWhileCancelling(java.lang.Throwable caughtWhileCancelling)
void
setQueryToCancel(Query queryToCancel)
-
Constructor Details
-
Method Details
-
cancel
public boolean cancel()- Specified by:
cancel
in interfaceCancelQueryTask
- Overrides:
cancel
in classjava.util.TimerTask
-
run
public void run()- Specified by:
run
in interfacejava.lang.Runnable
- Specified by:
run
in classjava.util.TimerTask
-
getCaughtWhileCancelling
public java.lang.Throwable getCaughtWhileCancelling()- Specified by:
getCaughtWhileCancelling
in interfaceCancelQueryTask
-
setCaughtWhileCancelling
public void setCaughtWhileCancelling(java.lang.Throwable caughtWhileCancelling)- Specified by:
setCaughtWhileCancelling
in interfaceCancelQueryTask
-
getQueryToCancel
- Specified by:
getQueryToCancel
in interfaceCancelQueryTask
-
setQueryToCancel
- Specified by:
setQueryToCancel
in interfaceCancelQueryTask
-