public void cancel() throws SQLException { connection.cancelQuery(); }
public void cancel() throws SQLException { if (statementState == StatementCancelState.IDLE) { return; } if (!STATE_UPDATER.compareAndSet(this, StatementCancelState.IN_QUERY, StatementCancelState.CANCELING)) { // Not in query, there's nothing to cancel return; } // Synchronize on connection to avoid spinning in killTimerTask synchronized (connection) { try { connection.cancelQuery(); } finally { STATE_UPDATER.set(this, StatementCancelState.CANCELLED); connection.notifyAll(); // wake-up killTimerTask } } }
public void cancel() throws SQLException { connection.cancelQuery(); }
public void cancel() throws SQLException { connection.cancelQuery(); }