Package org.hawaiiframework.async.sql
Class QueryTaskAbortStrategy
java.lang.Object
org.hawaiiframework.async.sql.QueryTaskAbortStrategy
- All Implemented Interfaces:
TaskAbortStrategy
A query abort strategy.
The QueryTaskAbortStrategy will call Statement.cancel() in order to stop a
query. It depends on the JDBC driver and database whether the cancel request is honoured.
-
Constructor Summary
ConstructorsConstructorDescriptionQueryTaskAbortStrategy(Statement statement) Create a new instance for the givenstatement. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninvoke()Invoke the strategy in order to abort the task (that registered this abort strategy).
-
Constructor Details
-
QueryTaskAbortStrategy
Create a new instance for the givenstatement.- Parameters:
statement- The statement to abort.
-
-
Method Details
-
invoke
public boolean invoke()Description copied from interface:TaskAbortStrategyInvoke the strategy in order to abort the task (that registered this abort strategy).- Specified by:
invokein interfaceTaskAbortStrategy- Returns:
trueif the task has been aborted.
-