/** * Cancel a running statement. * * @param targetSessionId the session id * @param statementId the statement to cancel */ void cancelStatement(String targetSessionId, int statementId) { if (StringUtils.equals(targetSessionId, this.sessionId)) { Command cmd = (Command) cache.getObject(statementId, false); cmd.cancel(); } }