/** */ private void neighborcastPartitionCountersAndRollback(IgniteInternalTx tx) { TxCounters txCounters = tx.txCounters(false); if (txCounters == null || txCounters.updateCounters() == null) tx.rollbackAsync(); PartitionCountersNeighborcastFuture fut = new PartitionCountersNeighborcastFuture(tx, cctx); fut.listen(fut0 -> tx.rollbackAsync()); fut.init(); }
/** * @param op Operation. * @param val Value to set. */ void setAndMarkValid(GridCacheOperation op, CacheObject val) { setAndMarkValid(op, val, this.val.hasWriteValue(), this.val.hasReadValue()); }
/** * @param tx Committed transaction. */ public void addCommittedTx(IgniteInternalTx tx) { addCommittedTx(tx, tx.xidVersion(), tx.nearXidVersion()); }
/** * @param res Response. */ private void detect(TxLocksResponse res) { assert res != null; merge(res); updateWaitForGraph(res.txLocks()); List<GridCacheVersion> cycle = findCycle(wfg, txId); if (cycle != null) onDone(new TxDeadlock(cycle, txs, txLockedKeys, txRequestedKeys)); else map(res.keys(), res.txLocks()); }
/** * @param val Value to set. */ public void setAndMarkValid(CacheObject val) { setAndMarkValid(op(), val, this.val.hasWriteValue(), this.val.hasReadValue()); }
/** * @param tx Committed transaction. */ public void addCommittedTxReturn(IgniteInternalTx tx, GridCacheReturnCompletableWrapper ret) { addCommittedTxReturn(tx.nearXidVersion(), null, ret); }
/** * @param tx Committed transaction. * @return If transaction was not already present in completed set. */ public boolean addRolledbackTx(IgniteInternalTx tx) { return addRolledbackTx(tx, tx.xidVersion()); }
/** * @param oldVal Old value. */ public void oldValue(CacheObject oldVal) { if (this.oldVal == null) this.oldVal = new TxEntryValueHolder(); this.oldVal.value(op(), oldVal, true, true); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); client = false; startGridsMultiThreaded(NODES_CNT); client = true; for (int i = 0; i < NODES_CNT; i++) startGrid(i + NODES_CNT); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); client = false; startGrids(NODES_CNT); client = true; for (int i = 0; i < NODES_CNT; i++) startGrid(i + NODES_CNT); }
/** * @param op Operation. * @param val Value to set. * @param hasReadVal Has read value flag. * @param hasWriteVal Has write value flag. */ void setAndMarkValid(GridCacheOperation op, CacheObject val, boolean hasWriteVal, boolean hasReadVal) { this.val.value(op, val, hasWriteVal, hasReadVal); markValid(); }
/** * @return {@code True} if transaction participates in a cache that has an interceptor configured. */ public boolean hasInterceptor() { return txState().hasInterceptor(cctx); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { cleanPersistenceDir(); super.beforeTest(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); cleanPersistenceDir(); } }