Class QueryTaskAbortStrategy

java.lang.Object
org.hawaiiframework.async.sql.QueryTaskAbortStrategy
All Implemented Interfaces:
TaskAbortStrategy

public class QueryTaskAbortStrategy extends Object implements 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 Details

    • QueryTaskAbortStrategy

      public QueryTaskAbortStrategy(Statement statement)
      Create a new instance for the given statement.
      Parameters:
      statement - The statement to abort.
  • Method Details

    • invoke

      public boolean invoke()
      Description copied from interface: TaskAbortStrategy
      Invoke the strategy in order to abort the task (that registered this abort strategy).
      Specified by:
      invoke in interface TaskAbortStrategy
      Returns:
      true if the task has been aborted.