Search in sources :

Example 71 with Transaction

use of org.apache.ignite.transactions.Transaction in project ignite by apache.

the class CacheContinuousQueryOperationFromCallbackTest method doTest.

/**
 * @param ccfg Cache configuration.
 * @throws Exception If failed.
 */
protected void doTest(final CacheConfiguration ccfg, boolean fromLsnr) throws Exception {
    ignite(0).createCache(ccfg);
    List<QueryCursor<?>> qries = new ArrayList<>();
    assertEquals(0, filterCbCntr.get());
    try {
        List<Set<T2<QueryTestKey, QueryTestValue>>> rcvdEvts = new ArrayList<>(NODES);
        List<Set<T2<QueryTestKey, QueryTestValue>>> evtsFromCallbacks = new ArrayList<>(NODES);
        final AtomicInteger qryCntr = new AtomicInteger(0);
        final AtomicInteger cbCntr = new AtomicInteger(0);
        final int threadCnt = SYSTEM_POOL_SIZE * 2;
        for (int idx = 0; idx < NODES; idx++) {
            Set<T2<QueryTestKey, QueryTestValue>> evts = Collections.newSetFromMap(new ConcurrentHashMap<T2<QueryTestKey, QueryTestValue>, Boolean>());
            Set<T2<QueryTestKey, QueryTestValue>> evtsFromCb = Collections.newSetFromMap(new ConcurrentHashMap<T2<QueryTestKey, QueryTestValue>, Boolean>());
            IgniteCache<Object, Object> cache = grid(idx).getOrCreateCache(ccfg.getName());
            ContinuousQuery qry = new ContinuousQuery();
            qry.setLocalListener(new TestCacheAsyncEventListener(evts, evtsFromCb, fromLsnr ? cache : null, qryCntr, cbCntr));
            if (!fromLsnr)
                qry.setRemoteFilterFactory(FactoryBuilder.factoryOf(new CacheTestRemoteFilterAsync(ccfg.getName())));
            rcvdEvts.add(evts);
            evtsFromCallbacks.add(evtsFromCb);
            QueryCursor qryCursor = cache.query(qry);
            qries.add(qryCursor);
        }
        IgniteInternalFuture<Long> f = GridTestUtils.runMultiThreadedAsync(new Runnable() {

            @Override
            public void run() {
                ThreadLocalRandom rnd = ThreadLocalRandom.current();
                for (int i = 0; i < ITERATION_CNT; i++) {
                    IgniteCache<QueryTestKey, QueryTestValue> cache = grid(rnd.nextInt(NODES)).cache(ccfg.getName());
                    QueryTestKey key = new QueryTestKey(rnd.nextInt(KEYS));
                    boolean startTx = cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL && rnd.nextBoolean();
                    Transaction tx = null;
                    if (startTx)
                        tx = cache.unwrap(Ignite.class).transactions().txStart();
                    try {
                        if ((cache.get(key) == null) || rnd.nextBoolean())
                            cache.invoke(key, new IncrementTestEntryProcessor());
                        else {
                            QueryTestValue val;
                            QueryTestValue newVal;
                            do {
                                val = cache.get(key);
                                newVal = val == null ? new QueryTestValue(0) : new QueryTestValue(val.val1 + 1);
                            } while (!cache.replace(key, val, newVal));
                        }
                    } finally {
                        if (tx != null)
                            tx.commit();
                    }
                }
            }
        }, threadCnt, "put-thread");
        f.get(30, TimeUnit.SECONDS);
        assert GridTestUtils.waitForCondition(new PA() {

            @Override
            public boolean apply() {
                return qryCntr.get() >= ITERATION_CNT * threadCnt * NODES;
            }
        }, TimeUnit.MINUTES.toMillis(2));
        for (Set<T2<QueryTestKey, QueryTestValue>> set : rcvdEvts) checkEvents(set, ITERATION_CNT * threadCnt, grid(0).cache(ccfg.getName()), false);
        if (fromLsnr) {
            final int expCnt = qryCntr.get() * NODES * KEYS_FROM_CALLBACK;
            boolean res = GridTestUtils.waitForCondition(new PA() {

                @Override
                public boolean apply() {
                    return cbCntr.get() >= expCnt;
                }
            }, TimeUnit.SECONDS.toMillis(60));
            assertTrue("Failed to wait events [exp=" + expCnt + ", act=" + cbCntr.get() + "]", res);
            assertEquals(expCnt, cbCntr.get());
            for (Set<T2<QueryTestKey, QueryTestValue>> set : evtsFromCallbacks) checkEvents(set, qryCntr.get() * KEYS_FROM_CALLBACK, grid(0).cache(ccfg.getName()), true);
        } else {
            final int expInvkCnt = ITERATION_CNT * threadCnt * (ccfg.getCacheMode() != REPLICATED ? (ccfg.getBackups() + 1) : NODES - 1) * NODES;
            GridTestUtils.waitForCondition(new PA() {

                @Override
                public boolean apply() {
                    return filterCbCntr.get() >= expInvkCnt;
                }
            }, TimeUnit.SECONDS.toMillis(60));
            assertEquals(expInvkCnt, filterCbCntr.get());
            for (Set<T2<QueryTestKey, QueryTestValue>> set : evtsFromCallbacks) checkEvents(set, expInvkCnt * KEYS_FROM_CALLBACK, grid(0).cache(ccfg.getName()), true);
        }
    } finally {
        for (QueryCursor<?> qry : qries) qry.close();
        ignite(0).destroyCache(ccfg.getName());
    }
}
Also used : Set(java.util.Set) LinkedHashSet(java.util.LinkedHashSet) ArrayList(java.util.ArrayList) ContinuousQuery(org.apache.ignite.cache.query.ContinuousQuery) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Ignite(org.apache.ignite.Ignite) QueryCursor(org.apache.ignite.cache.query.QueryCursor) T2(org.apache.ignite.internal.util.typedef.T2) IgniteCache(org.apache.ignite.IgniteCache) PA(org.apache.ignite.internal.util.typedef.PA) Transaction(org.apache.ignite.transactions.Transaction) AtomicInteger(java.util.concurrent.atomic.AtomicInteger)

Example 72 with Transaction

use of org.apache.ignite.transactions.Transaction in project ignite by apache.

the class CacheContinuousQueryRandomOperationsTest method randomUpdate.

/**
 * @param rnd Random generator.
 * @param evtsQueues Events queue.
 * @param expData Expected cache data.
 * @param partCntr Partition counter.
 * @param cache Cache.
 * @throws Exception If failed.
 */
private void randomUpdate(Random rnd, List<BlockingQueue<CacheEntryEvent<?, ?>>> evtsQueues, ConcurrentMap<Object, Object> expData, Map<Integer, Long> partCntr, IgniteCache<Object, Object> cache) throws Exception {
    Object key = new QueryTestKey(rnd.nextInt(KEYS));
    Object newVal = value(rnd);
    Object oldVal = expData.get(key);
    int op = rnd.nextInt(13);
    Ignite ignite = cache.unwrap(Ignite.class);
    Map<Object, Long> expEvtCntrs = new ConcurrentHashMap<>();
    Transaction tx = null;
    if (cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL && rnd.nextBoolean())
        tx = ignite.transactions().txStart(txRandomConcurrency(rnd), txRandomIsolation(rnd));
    try {
        switch(op) {
            case 0:
                {
                    cache.put(key, newVal);
                    if (tx != null)
                        tx.commit();
                    updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, newVal, oldVal);
                    expData.put(key, newVal);
                    break;
                }
            case 1:
                {
                    cache.getAndPut(key, newVal);
                    if (tx != null)
                        tx.commit();
                    updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, newVal, oldVal);
                    expData.put(key, newVal);
                    break;
                }
            case 2:
                {
                    cache.remove(key);
                    if (tx != null)
                        tx.commit();
                    updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, null, oldVal);
                    expData.remove(key);
                    break;
                }
            case 3:
                {
                    cache.getAndRemove(key);
                    if (tx != null)
                        tx.commit();
                    updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, null, oldVal);
                    expData.remove(key);
                    break;
                }
            case 4:
                {
                    cache.invoke(key, new EntrySetValueProcessor(newVal, rnd.nextBoolean()));
                    if (tx != null)
                        tx.commit();
                    updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, newVal, oldVal);
                    expData.put(key, newVal);
                    break;
                }
            case 5:
                {
                    cache.invoke(key, new EntrySetValueProcessor(null, rnd.nextBoolean()));
                    if (tx != null)
                        tx.commit();
                    updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, null, oldVal);
                    expData.remove(key);
                    break;
                }
            case 6:
                {
                    cache.putIfAbsent(key, newVal);
                    if (tx != null)
                        tx.commit();
                    if (oldVal == null) {
                        updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                        waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, newVal, null);
                        expData.put(key, newVal);
                    } else
                        checkNoEvent(evtsQueues);
                    break;
                }
            case 7:
                {
                    cache.getAndPutIfAbsent(key, newVal);
                    if (tx != null)
                        tx.commit();
                    if (oldVal == null) {
                        updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                        waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, newVal, null);
                        expData.put(key, newVal);
                    } else
                        checkNoEvent(evtsQueues);
                    break;
                }
            case 8:
                {
                    cache.replace(key, newVal);
                    if (tx != null)
                        tx.commit();
                    if (oldVal != null) {
                        updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                        waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, newVal, oldVal);
                        expData.put(key, newVal);
                    } else
                        checkNoEvent(evtsQueues);
                    break;
                }
            case 9:
                {
                    cache.getAndReplace(key, newVal);
                    if (tx != null)
                        tx.commit();
                    if (oldVal != null) {
                        updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                        waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, newVal, oldVal);
                        expData.put(key, newVal);
                    } else
                        checkNoEvent(evtsQueues);
                    break;
                }
            case 10:
                {
                    if (oldVal != null) {
                        Object replaceVal = value(rnd);
                        boolean success = replaceVal.equals(oldVal);
                        if (success) {
                            cache.replace(key, replaceVal, newVal);
                            if (tx != null)
                                tx.commit();
                            updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
                            waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), key, newVal, oldVal);
                            expData.put(key, newVal);
                        } else {
                            cache.replace(key, replaceVal, newVal);
                            if (tx != null)
                                tx.commit();
                            checkNoEvent(evtsQueues);
                        }
                    } else {
                        cache.replace(key, value(rnd), newVal);
                        if (tx != null)
                            tx.commit();
                        checkNoEvent(evtsQueues);
                    }
                    break;
                }
            case 11:
                {
                    SortedMap<Object, Object> vals = new TreeMap<>();
                    while (vals.size() < KEYS / 5) vals.put(new QueryTestKey(rnd.nextInt(KEYS)), value(rnd));
                    cache.putAll(vals);
                    if (tx != null)
                        tx.commit();
                    for (Map.Entry<Object, Object> e : vals.entrySet()) updatePartitionCounter(cache, e.getKey(), partCntr, expEvtCntrs);
                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), vals, expData);
                    expData.putAll(vals);
                    break;
                }
            case 12:
                {
                    SortedMap<Object, Object> vals = new TreeMap<>();
                    while (vals.size() < KEYS / 5) vals.put(new QueryTestKey(rnd.nextInt(KEYS)), newVal);
                    cache.invokeAll(vals.keySet(), new EntrySetValueProcessor(newVal, rnd.nextBoolean()));
                    if (tx != null)
                        tx.commit();
                    for (Map.Entry<Object, Object> e : vals.entrySet()) updatePartitionCounter(cache, e.getKey(), partCntr, expEvtCntrs);
                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache), vals, expData);
                    for (Object o : vals.keySet()) expData.put(o, newVal);
                    break;
                }
            default:
                fail("Op:" + op);
        }
    } finally {
        if (tx != null)
            tx.close();
    }
}
Also used : MutableEntry(javax.cache.processor.MutableEntry) Transaction(org.apache.ignite.transactions.Transaction) SortedMap(java.util.SortedMap) Ignite(org.apache.ignite.Ignite) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration)

Example 73 with Transaction

use of org.apache.ignite.transactions.Transaction in project ignite by apache.

the class CacheContinuousQueryVariationsTest method randomUpdate.

/**
 * @param rnd Random generator.
 * @param evtsQueues Events queue.
 * @param expData Expected cache data.
 * @param cache Cache.
 * @throws Exception If failed.
 */
private void randomUpdate(Random rnd, List<BlockingQueue<CacheEntryEvent<?, ?>>> evtsQueues, ConcurrentMap<Object, Object> expData, IgniteCache<Object, Object> cache, boolean keepBinary, boolean withFilter) throws Exception {
    Object key = key(rnd.nextInt(KEYS));
    Object newVal = value(rnd.nextInt());
    Object oldVal = expData.get(key);
    int op = rnd.nextInt(11);
    Ignite ignite = cache.unwrap(Ignite.class);
    Transaction tx = null;
    if (cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL && rnd.nextBoolean())
        tx = ignite.transactions().txStart(txRandomConcurrency(rnd), txRandomIsolation(rnd));
    try {
        switch(op) {
            case 0:
                {
                    cache.put(key, newVal);
                    if (tx != null)
                        tx.commit();
                    waitAndCheckEvent(evtsQueues, key, newVal, oldVal, keepBinary, withFilter);
                    expData.put(key, newVal);
                    break;
                }
            case 1:
                {
                    cache.getAndPut(key, newVal);
                    if (tx != null)
                        tx.commit();
                    waitAndCheckEvent(evtsQueues, key, newVal, oldVal, keepBinary, withFilter);
                    expData.put(key, newVal);
                    break;
                }
            case 2:
                {
                    cache.remove(key);
                    if (tx != null)
                        tx.commit();
                    waitAndCheckEvent(evtsQueues, key, null, oldVal, keepBinary, withFilter);
                    expData.remove(key);
                    break;
                }
            case 3:
                {
                    cache.getAndRemove(key);
                    if (tx != null)
                        tx.commit();
                    waitAndCheckEvent(evtsQueues, key, null, oldVal, keepBinary, withFilter);
                    expData.remove(key);
                    break;
                }
            case 4:
                {
                    cache.invoke(key, new EntrySetValueProcessor(newVal, rnd.nextBoolean()));
                    if (tx != null)
                        tx.commit();
                    waitAndCheckEvent(evtsQueues, key, newVal, oldVal, keepBinary, withFilter);
                    expData.put(key, newVal);
                    break;
                }
            case 5:
                {
                    cache.invoke(key, new EntrySetValueProcessor(null, rnd.nextBoolean()));
                    if (tx != null)
                        tx.commit();
                    waitAndCheckEvent(evtsQueues, key, null, oldVal, keepBinary, withFilter);
                    expData.remove(key);
                    break;
                }
            case 6:
                {
                    cache.putIfAbsent(key, newVal);
                    if (tx != null)
                        tx.commit();
                    if (oldVal == null) {
                        waitAndCheckEvent(evtsQueues, key, newVal, null, keepBinary, withFilter);
                        expData.put(key, newVal);
                    } else
                        checkNoEvent(evtsQueues);
                    break;
                }
            case 7:
                {
                    cache.getAndPutIfAbsent(key, newVal);
                    if (tx != null)
                        tx.commit();
                    if (oldVal == null) {
                        waitAndCheckEvent(evtsQueues, key, newVal, null, keepBinary, withFilter);
                        expData.put(key, newVal);
                    } else
                        checkNoEvent(evtsQueues);
                    break;
                }
            case 8:
                {
                    cache.replace(key, newVal);
                    if (tx != null)
                        tx.commit();
                    if (oldVal != null) {
                        waitAndCheckEvent(evtsQueues, key, newVal, oldVal, keepBinary, withFilter);
                        expData.put(key, newVal);
                    } else
                        checkNoEvent(evtsQueues);
                    break;
                }
            case 9:
                {
                    cache.getAndReplace(key, newVal);
                    if (tx != null)
                        tx.commit();
                    if (oldVal != null) {
                        waitAndCheckEvent(evtsQueues, key, newVal, oldVal, keepBinary, withFilter);
                        expData.put(key, newVal);
                    } else
                        checkNoEvent(evtsQueues);
                    break;
                }
            case 10:
                {
                    if (oldVal != null) {
                        Object replaceVal = value(rnd.nextInt(VALS));
                        boolean success = replaceVal.equals(oldVal);
                        if (success) {
                            cache.replace(key, replaceVal, newVal);
                            if (tx != null)
                                tx.commit();
                            waitAndCheckEvent(evtsQueues, key, newVal, oldVal, keepBinary, withFilter);
                            expData.put(key, newVal);
                        } else {
                            cache.replace(key, replaceVal, newVal);
                            if (tx != null)
                                tx.commit();
                            checkNoEvent(evtsQueues);
                        }
                    } else {
                        cache.replace(key, value(rnd.nextInt(VALS)), newVal);
                        if (tx != null)
                            tx.commit();
                        checkNoEvent(evtsQueues);
                    }
                    break;
                }
            default:
                fail("Op:" + op);
        }
    } finally {
        if (tx != null)
            tx.close();
    }
}
Also used : Transaction(org.apache.ignite.transactions.Transaction) BinaryObject(org.apache.ignite.binary.BinaryObject) Ignite(org.apache.ignite.Ignite) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration)

Example 74 with Transaction

use of org.apache.ignite.transactions.Transaction in project ignite by apache.

the class IgnitePdsTransactionsHangTest method testTransactionsDontHang.

/**
 * Copied from customers benchmark.
 *
 * @throws Exception If failed.
 */
public void testTransactionsDontHang() throws Exception {
    try {
        final Ignite g = startGrids(2);
        g.active(true);
        g.getOrCreateCache(getCacheConfiguration());
        ExecutorService threadPool = Executors.newFixedThreadPool(THREADS_CNT);
        final CyclicBarrier cyclicBarrier = new CyclicBarrier(THREADS_CNT);
        final AtomicBoolean interrupt = new AtomicBoolean(false);
        final LongAdder operationCnt = new LongAdder();
        final IgniteCache<Long, TestEntity> cache = g.cache(CACHE_NAME);
        for (int i = 0; i < THREADS_CNT; i++) {
            threadPool.submit(new Runnable() {

                @Override
                public void run() {
                    try {
                        ThreadLocalRandom locRandom = ThreadLocalRandom.current();
                        cyclicBarrier.await();
                        while (!interrupt.get()) {
                            long randomKey = locRandom.nextLong(MAX_KEY_COUNT);
                            TestEntity entity = TestEntity.newTestEntity(locRandom);
                            try (Transaction tx = g.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                                cache.put(randomKey, entity);
                                tx.commit();
                            }
                            operationCnt.increment();
                        }
                    } catch (Throwable e) {
                        log.error("Unexpected exception:", e);
                        throw new RuntimeException(e);
                    }
                }
            });
        }
        long stopTime = System.currentTimeMillis() + DURATION * 1000;
        long totalOperations = 0;
        int periods = 0;
        long max = Long.MIN_VALUE, min = Long.MAX_VALUE;
        while (System.currentTimeMillis() < stopTime) {
            U.sleep(1000);
            long sum = operationCnt.sumThenReset();
            periods++;
            if (periods > WARM_UP_PERIOD) {
                totalOperations += sum;
                max = Math.max(max, sum);
                min = Math.min(min, sum);
                log.info("Operation count: " + sum + " min=" + min + " max=" + max + " avg=" + totalOperations / (periods - WARM_UP_PERIOD));
            }
        }
        interrupt.set(true);
        threadPool.shutdown();
        log.info("Test complete");
        threadPool.awaitTermination(getTestTimeout(), TimeUnit.MILLISECONDS);
        IgniteTxManager tm = internalCache(cache).context().tm();
        assertEquals("There are still active transactions", 0, tm.activeTransactions().size());
    } finally {
        stopAllGrids();
    }
}
Also used : IgniteTxManager(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager) CyclicBarrier(java.util.concurrent.CyclicBarrier) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) LongAdder(java.util.concurrent.atomic.LongAdder) Transaction(org.apache.ignite.transactions.Transaction) ExecutorService(java.util.concurrent.ExecutorService) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Ignite(org.apache.ignite.Ignite)

Example 75 with Transaction

use of org.apache.ignite.transactions.Transaction in project ignite by apache.

the class IgniteCacheNearOnlyTxTest method testConcurrentTx.

/**
 * @throws Exception If failed.
 */
public void testConcurrentTx() throws Exception {
    final Ignite ignite1 = ignite(1);
    assertTrue(ignite1.configuration().isClientMode());
    ignite1.createNearCache(DEFAULT_CACHE_NAME, new NearCacheConfiguration<>());
    final Integer key = 1;
    IgniteInternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {

        @Override
        public Object call() throws Exception {
            IgniteCache<Integer, Integer> cache = ignite1.cache(DEFAULT_CACHE_NAME);
            for (int i = 0; i < 100; i++) cache.put(key, 1);
            return null;
        }
    }, 5, "put1-thread");
    IgniteInternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {

        @Override
        public Object call() throws Exception {
            IgniteCache<Integer, Integer> cache = ignite1.cache(DEFAULT_CACHE_NAME);
            IgniteTransactions txs = ignite1.transactions();
            for (int i = 0; i < 100; i++) {
                try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ)) {
                    cache.get(key);
                    cache.put(key, 1);
                    tx.commit();
                }
            }
            return null;
        }
    }, 5, "put2-thread");
    fut1.get();
    fut2.get();
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Transaction(org.apache.ignite.transactions.Transaction) IgniteCache(org.apache.ignite.IgniteCache) Ignite(org.apache.ignite.Ignite) IgniteTransactions(org.apache.ignite.IgniteTransactions)

Aggregations

Transaction (org.apache.ignite.transactions.Transaction)493 Ignite (org.apache.ignite.Ignite)204 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)183 IgniteCache (org.apache.ignite.IgniteCache)88 IgniteTransactions (org.apache.ignite.IgniteTransactions)78 IgniteException (org.apache.ignite.IgniteException)74 CacheException (javax.cache.CacheException)60 HashMap (java.util.HashMap)54 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)45 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)44 TransactionOptimisticException (org.apache.ignite.transactions.TransactionOptimisticException)42 ArrayList (java.util.ArrayList)41 Callable (java.util.concurrent.Callable)41 Map (java.util.Map)36 IgniteEx (org.apache.ignite.internal.IgniteEx)34 CountDownLatch (java.util.concurrent.CountDownLatch)32 IgniteKernal (org.apache.ignite.internal.IgniteKernal)30 TransactionConcurrency (org.apache.ignite.transactions.TransactionConcurrency)30 ThreadLocalRandom (java.util.concurrent.ThreadLocalRandom)29 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)29