/** * * @param ctx Transaction context. * @param key Key. */ private void unlock(TxContext ctx, Object key) { if (ctx.unlocked(key)) { // Finish transaction if last key is unlocked. txCtx.remove(); GridNearTxLocal tx = cache.tx(); assert tx != null; try { tx.proxy().commit(); } finally { tx.proxy().close(); } assert cache.tx() == null; } }
/** {@inheritDoc} */ @Override public TransactionConcurrency concurrency() { return tx().concurrency(); }
/** {@inheritDoc} */ @Override public boolean implicit() { return tx().implicit(); }
/** {@inheritDoc} */ @Override public boolean isInvalidate() { return tx().isInvalidate(); }
/** {@inheritDoc} */ @Override public boolean isRollbackOnly() { return tx().isRollbackOnly(); }
/** {@inheritDoc} */ @Override public UUID nodeId() { return tx().nodeId(); }
/** {@inheritDoc} */ @Override public TransactionIsolation isolation() { return tx().isolation(); }
/** {@inheritDoc} */ @Nullable @Override public String label() { return tx().label(); }
/** * Roll backs current transaction. */ private void rollbackCurrentTx() { try { TxContext ctx = txCtx.get(); if (ctx != null) { txCtx.remove(); GridNearTxLocal tx = cache.tx(); if (tx != null) tx.proxy().rollback(); } } catch (IgniteException e) { log.error("Failed to rollback cache transaction.", e); } }
/** {@inheritDoc} */ @Override public boolean isInvalidate() { return tx().isInvalidate(); }
/** {@inheritDoc} */ @Override public boolean isRollbackOnly() { return tx().isRollbackOnly(); }
/** {@inheritDoc} */ @Override public UUID nodeId() { return tx().nodeId(); }
/** {@inheritDoc} */ @Override public TransactionIsolation isolation() { return tx().isolation(); }
/** {@inheritDoc} */ @Nullable @Override public String label() { return tx().label(); }
/** {@inheritDoc} */ @Override public boolean implicit() { return tx().implicit(); }
/** {@inheritDoc} */ @Override public TransactionConcurrency concurrency() { return tx().concurrency(); }