/** {@inheritDoc} */ @Override public String toString() { return GridToStringBuilder.toString(IgniteTxLocalAdapter.class, this, "super", super.toString(), "size", allEntries().size()); }
/** {@inheritDoc} */ @Override public void userRollback(boolean clearThreadMap) throws IgniteCheckedException { TransactionState state = state(); if (state != ROLLING_BACK && state != ROLLED_BACK) { setRollbackOnly(); throw new IgniteCheckedException("Invalid transaction state for rollback [state=" + state + ", tx=" + this + ']'); } if (near()) { // Must evict near entries before rolling back from // transaction manager, so they will be removed from cache. for (IgniteTxEntry e : allEntries()) evictNearEntry(e, false); } if (DONE_FLAG_UPD.compareAndSet(this, 0, 1)) { cctx.tm().rollbackTx(this, clearThreadMap, skipCompletedVersions()); cctx.mvccCaching().onTxFinished(this, false); if (!internal()) { Collection<CacheStoreManager> stores = txState.stores(cctx); if (stores != null && !stores.isEmpty()) { assert isWriteToStoreFromDhtValid(stores) : "isWriteToStoreFromDht can't be different within one transaction"; boolean isWriteToStoreFromDht = F.first(stores).isWriteToStoreFromDht(); if (!stores.isEmpty() && (near() || isWriteToStoreFromDht)) sessionEnd(stores, false); } } } }
Collection<IgniteTxEntry> commitEntries = (near() || cctx.snapshot().needTxReadLogging()) ? allEntries() : writeEntries();
/** {@inheritDoc} */ @Override public String toString() { return GridToStringBuilder.toString(IgniteTxLocalAdapter.class, this, "super", super.toString(), "size", allEntries().size()); }
/** {@inheritDoc} */ @Override public void userRollback(boolean clearThreadMap) throws IgniteCheckedException { TransactionState state = state(); if (state != ROLLING_BACK && state != ROLLED_BACK) { setRollbackOnly(); throw new IgniteCheckedException("Invalid transaction state for rollback [state=" + state + ", tx=" + this + ']'); } if (near()) { // Must evict near entries before rolling back from // transaction manager, so they will be removed from cache. for (IgniteTxEntry e : allEntries()) evictNearEntry(e, false); } if (DONE_FLAG_UPD.compareAndSet(this, 0, 1)) { cctx.tm().rollbackTx(this, clearThreadMap, forceSkipCompletedVers); cctx.mvccCaching().onTxFinished(this, false); if (!internal()) { Collection<CacheStoreManager> stores = txState.stores(cctx); if (stores != null && !stores.isEmpty()) { assert isWriteToStoreFromDhtValid(stores) : "isWriteToStoreFromDht can't be different within one transaction"; boolean isWriteToStoreFromDht = F.first(stores).isWriteToStoreFromDht(); if (!stores.isEmpty() && (near() || isWriteToStoreFromDht)) sessionEnd(stores, false); } } } }
Collection<IgniteTxEntry> commitEntries = (near() || cctx.snapshot().needTxReadLogging()) ? allEntries() : writeEntries();