public void clear(Cache cache) { getTransactionalCache(cache).clear(); }
public void commit() { for (TransactionalCache txCache : transactionalCaches.values()) { txCache.commit(); } }
public void putObject(Cache cache, CacheKey key, Object value) { getTransactionalCache(cache).putObject(key, value); }
public void rollback() { unlockMissedEntries(); reset(); }
public void commit() { if (clearOnCommit) { delegate.clear(); } flushPendingEntries(); reset(); }
public void rollback() { for (TransactionalCache txCache : transactionalCaches.values()) { txCache.rollback(); } }
public void clear() { reset(); clearOnCommit = true; }
private TransactionalCache getTransactionalCache(Cache cache) { TransactionalCache txCache = transactionalCaches.get(cache); if (txCache == null) { txCache = new TransactionalCache(cache); transactionalCaches.put(cache, txCache); } return txCache; }
public Object getObject(Cache cache, CacheKey key) { return getTransactionalCache(cache).getObject(key); }
public void commit() { if (clearOnCommit) { delegate.clear(); } flushPendingEntries(); reset(); }
public void rollback() { unlockMissedEntries(); reset(); }
public void rollback() { for (TransactionalCache txCache : transactionalCaches.values()) { txCache.rollback(); } }
public void rollback() { reset(); }
private TransactionalCache getTransactionalCache(Cache cache) { TransactionalCache txCache = transactionalCaches.get(cache); if (txCache == null) { txCache = new TransactionalCache(cache); transactionalCaches.put(cache, txCache); } return txCache; }
public Object getObject(Cache cache, CacheKey key) { return getTransactionalCache(cache).getObject(key); }
public void commit() { for (TransactionalCache txCache : transactionalCaches.values()) { txCache.commit(); } }
public void rollback() { for (TransactionalCache txCache : transactionalCaches.values()) { txCache.rollback(); } }
public void putObject(Cache cache, CacheKey key, Object value) { getTransactionalCache(cache).putObject(key, value); }
public void clear(Cache cache) { getTransactionalCache(cache).clear(); }
public void commit() { delegate.getReadWriteLock().writeLock().lock(); try { if (clearOnCommit) { delegate.clear(); } else { for (RemoveEntry entry : entriesToRemoveOnCommit.values()) { entry.commit(); } } for (AddEntry entry : entriesToAddOnCommit.values()) { entry.commit(); } reset(); } finally { delegate.getReadWriteLock().writeLock().unlock(); } }