/** * @param e Error. */ void onError(Throwable e) { if (isDone()) { U.warn(log, "Received error when future is done [fut=" + this + ", err=" + e + ", tx=" + tx + ']'); return; } if (log.isDebugEnabled()) log.debug("Error on tx prepare [fut=" + this + ", err=" + e + ", tx=" + tx + ']'); if (ERR_UPD.compareAndSet(GridNearPessimisticTxPrepareFuture.this, null, e)) tx.setRollbackOnly(); onDone(e); }
/** * @param e Error. */ void onError(Throwable e) { if (isDone()) { U.warn(log, "Received error when future is done [fut=" + this + ", err=" + e + ", tx=" + tx + ']'); return; } if (log.isDebugEnabled()) log.debug("Error on tx prepare [fut=" + this + ", err=" + e + ", tx=" + tx + ']'); if (ERR_UPD.compareAndSet(GridNearPessimisticTxPrepareFuture.this, null, e)) tx.setRollbackOnly(); onDone(e); }
/** * @param e Error. */ void onNodeLeft(ClusterTopologyCheckedException e) { if (msgLog.isDebugEnabled()) { msgLog.debug("Near pessimistic prepare, mini future node left [txId=" + tx.nearXidVersion() + ", nodeId=" + m.primary().id() + ']'); } if (tx.onePhaseCommit()) { tx.markForBackupCheck(); // Do not fail future for one-phase transaction right away. onDone((GridNearTxPrepareResponse)null); } onError(e); }
/** * @param res Response. * @param updateMapping Update mapping flag. */ void onResult(GridNearTxPrepareResponse res, boolean updateMapping) { if (res.error() != null) onError(res.error()); else { if (res.mvccSnapshot() != null) tx.mvccSnapshot(res.mvccSnapshot()); onPrepareResponse(m, res, updateMapping); onDone(res); } }
/** * @param e Error. */ void onNodeLeft(ClusterTopologyCheckedException e) { if (msgLog.isDebugEnabled()) { msgLog.debug("Near pessimistic prepare, mini future node left [txId=" + tx.nearXidVersion() + ", nodeId=" + m.primary().id() + ']'); } if (tx.onePhaseCommit()) { tx.markForBackupCheck(); // Do not fail future for one-phase transaction right away. onDone((GridNearTxPrepareResponse)null); } onError(e); }
/** * @param res Response. * @param updateMapping Update mapping flag. */ void onResult(GridNearTxPrepareResponse res, boolean updateMapping) { if (res.error() != null) onError(res.error()); else { onPrepareResponse(m, res, updateMapping); onDone(res); } }