Ejemplo n.º 1
0
 /**
  * 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() {
   throttle();
   if (cancelAt == 0) {
     return;
   }
   long time = System.currentTimeMillis();
   if (time >= cancelAt) {
     cancelAt = 0;
     throw DbException.get(ErrorCode.STATEMENT_WAS_CANCELED);
   }
 }