Refine search
public InfinispanBatcher(Cache<?, ?> cache) { this(cache.getAdvancedCache().getTransactionManager()); }
private boolean remove(String id, Cache<SessionCreationMetaDataKey, SessionCreationMetaDataEntry<L>> creationMetaDataCache) { SessionCreationMetaDataKey key = new SessionCreationMetaDataKey(id); try { if (!this.properties.isLockOnWrite() || (creationMetaDataCache.getAdvancedCache().getTransactionManager().getTransaction() == null) || creationMetaDataCache.getAdvancedCache().withFlags(Flag.ZERO_LOCK_ACQUISITION_TIMEOUT, Flag.FAIL_SILENTLY).lock(key)) { creationMetaDataCache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES).remove(key); this.accessMetaDataCache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES).remove(new SessionAccessMetaDataKey(id)); return true; } return false; } catch (SystemException e) { throw new CacheException(e); } }
@Override protected TransactionManager getTransactionManager() { return cache.getAdvancedCache().getTransactionManager(); }
@Override protected TransactionManager getTransactionManager() { return cache.getAdvancedCache().getTransactionManager(); }
private boolean isCurrentTransactionInRollback() { boolean result = false; try { int transactionStatus = cache.getJBossCache().getAdvancedCache().getTransactionManager().getStatus(); if (transactionStatus == Status.STATUS_MARKED_ROLLBACK) { result = true; } } catch (SystemException ex) { } return result; }
protected TransactionManager getTransactionManager(Session session) { Cache<Object, Object> cache = session.getCache(cacheName); return cache.getAdvancedCache().getTransactionManager(); } }
protected TransactionManager getTransactionManager(Session session) { Cache<Object, Object> cache = session.getCache(cacheName); return cache.getAdvancedCache().getTransactionManager(); } }
public IncrementCounterTask(Cache<String, Integer> cache, Set<Integer> uniqueValuesSet) { this.cache = cache; this.transactionManager = cache.getAdvancedCache().getTransactionManager(); this.uniqueValuesSet = uniqueValuesSet; this.lastValue = 0; }
public IncrementCounterTask(Cache<String, Integer> cache, ConcurrentSkipListSet<Integer> uniqueValuesSet, int counterMaxValue) { this.cache = cache; this.transactionManager = cache.getAdvancedCache().getTransactionManager(); this.uniqueValuesSet = uniqueValuesSet; this.lastValue = 0; this.counterMaxValue = counterMaxValue; }
private TxThread(Cache<Object, Object> cache, CountDownLatch txStartedLatch) { this.cache = cache; this.tx = null; this.tm = cache.getAdvancedCache().getTransactionManager(); this.txStartedLatch = txStartedLatch; }
protected TransactionManager tm() { return cache.getAdvancedCache().getTransactionManager(); }
public static TransactionManager getTransactionManager(Cache cache) { return cache == null ? null : cache.getAdvancedCache().getTransactionManager(); }
private TransactionManager beginTransaction(Cache cache) throws NotSupportedException, SystemException { TransactionManager mgr = cache.getAdvancedCache().getTransactionManager(); mgr.begin(); return mgr; }
protected Transaction tx() { try { return cache.getAdvancedCache().getTransactionManager().getTransaction(); } catch (SystemException e) { throw new RuntimeException(e); } }
private void resetCache(final Cache<Object, Object> cache) { if (cache.getCacheConfiguration().invocationBatching().enabled()) { cache.endBatch(false); } TransactionManager tm = cache.getAdvancedCache().getTransactionManager(); try { if (tm.getTransaction() != null) { tm.rollback(); } } catch (Exception e) { } }
public Transaction tx() { try { return super.cache(0).getAdvancedCache().getTransactionManager().getTransaction(); } catch (SystemException e) { throw new RuntimeException(e); } }
protected Transaction tx(int i) { try { return cache(i).getAdvancedCache().getTransactionManager().getTransaction(); } catch (SystemException e) { throw new RuntimeException(e); } }
@Override public void call() { assert cm.getCache().getAdvancedCache().getTransactionManager() != null; } });
public TransactionManager tm() { return super.cache(0).getAdvancedCache().getTransactionManager(); }
public static TransactionManager getTransactionManager(MultimapCache multimapCache) { EmbeddedMultimapCache embeddedMultimapCache = (EmbeddedMultimapCache) multimapCache; return embeddedMultimapCache == null ? null : embeddedMultimapCache.getCache().getAdvancedCache().getTransactionManager(); }