@Override public void cancel() { this.cancel = true; this.session.doCancel(); }
/** * Check if the current transaction is canceled by calling * Statement.cancel() or because a session timeout was set and expired. * * @throws DbException if the transaction is canceled */ public void checkCanceled() { if (cancelAt == 0) { return; } long time = System.currentTimeMillis(); if (time >= cancelAt) { cancelAt = 0; doCancel(); throw DbException.get(ErrorCode.STATEMENT_WAS_CANCELED); } }