/** * Cancellation has special meaning for lock futures. It's called then lock must be released on rollback. */ @Override public boolean cancel() { if (inTx()) onError(tx.rollbackException()); return onComplete(false, true); }
/** * @param cached Entry to check. * @return {@code True} if filter passed. */ private boolean filter(GridCacheEntryEx cached) { try { if (!cctx.isAll(cached, filter)) { if (log.isDebugEnabled()) log.debug("Filter didn't pass for entry (will fail lock): " + cached); onFailed(true); return false; } return true; } catch (IgniteCheckedException e) { onError(e); return false; } }
/** {@inheritDoc} */ @Override public boolean onDone(Boolean success, Throwable err) { if (log.isDebugEnabled()) log.debug("Received onDone(..) callback [success=" + success + ", err=" + err + ", fut=" + this + ']'); if (inTx() && cctx.tm().deadlockDetectionEnabled() && (this.err instanceof IgniteTxTimeoutCheckedException || timedOut)) return false; // If locks were not acquired yet, delay completion. if (isDone() || (err == null && success && !checkLocks())) return false; if (err != null && !(err instanceof GridCacheLockTimeoutException)) onError(err); if (err != null) success = false; return onComplete(success, true); }
/** * Cancellation has special meaning for lock futures. It's called then lock must be released on rollback. */ @Override public boolean cancel() { if (inTx()) onError(tx.rollbackException()); return onComplete(false, true); }
/** * @param cached Entry to check. * @return {@code True} if filter passed. */ private boolean filter(GridCacheEntryEx cached) { try { if (!cctx.isAll(cached, filter)) { if (log.isDebugEnabled()) log.debug("Filter didn't pass for entry (will fail lock): " + cached); onFailed(true); return false; } return true; } catch (IgniteCheckedException e) { onError(e); return false; } }
/** {@inheritDoc} */ @Override public boolean onDone(Boolean success, Throwable err) { if (log.isDebugEnabled()) log.debug("Received onDone(..) callback [success=" + success + ", err=" + err + ", fut=" + this + ']'); if (inTx() && cctx.tm().deadlockDetectionEnabled() && (this.err instanceof IgniteTxTimeoutCheckedException || timedOut)) return false; // If locks were not acquired yet, delay completion. if (isDone() || (err == null && success && !checkLocks())) return false; if (err != null && !(err instanceof GridCacheLockTimeoutException)) onError(err); if (err != null) success = false; return onComplete(success, true); }