/** * {@inheritDoc} */ public void write(final Element element) { readLock.lock(); try { getQueue(element.getKey()).write(element); } finally { readLock.unlock(); } }
/** * Create using the given cache. * * @param cache cache */ public WriteBehindManager(final Cache cache, final Store store) { if (cache.isTerracottaClustered()) { writeBehind = ((TerracottaStore)store).createWriteBehind(); } else if (cache.getCacheConfiguration().getPersistenceConfiguration() != null && cache.getCacheConfiguration().getPersistenceConfiguration().getStrategy() == Strategy.LOCALRESTARTABLE) { writeBehind = cache.getCacheManager().getFeaturesManager().createWriteBehind(cache); } else { writeBehind = new WriteBehindQueueManager(cache.getCacheConfiguration()); } }
/** * Create using the given cache. * * @param cache cache */ public WriteBehindManager(final Cache cache, final Store store) { if (cache.isTerracottaClustered()) { writeBehind = ((TerracottaStore)store).createWriteBehind(); } else if (cache.getCacheConfiguration().getPersistenceConfiguration() != null && cache.getCacheConfiguration().getPersistenceConfiguration().getStrategy() == Strategy.LOCALRESTARTABLE) { writeBehind = cache.getCacheManager().getFeaturesManager().createWriteBehind(cache); } else { writeBehind = new WriteBehindQueueManager(cache.getCacheConfiguration()); } }
/** * {@inheritDoc} */ public void delete(final CacheEntry entry) { readLock.lock(); try { getQueue(entry.getKey()).delete(entry); } finally { readLock.unlock(); } }
/** * Create using the given cache. * * @param cache cache */ public WriteBehindManager(final Cache cache, final Store store) { if (cache.isTerracottaClustered()) { writeBehind = ((TerracottaStore)store).createWriteBehind(); } else if (cache.getCacheConfiguration().getPersistenceConfiguration() != null && cache.getCacheConfiguration().getPersistenceConfiguration().getStrategy() == Strategy.LOCALRESTARTABLE) { writeBehind = cache.getCacheManager().getFeaturesManager().createWriteBehind(cache); } else { writeBehind = new WriteBehindQueueManager(cache.getCacheConfiguration()); } }
/** * {@inheritDoc} */ public void write(final Element element) { readLock.lock(); try { getQueue(element.getKey()).write(element); } finally { readLock.unlock(); } }
/** * Create using the given cache. * * @param cache cache */ public WriteBehindManager(final Cache cache) { if (cache.isTerracottaClustered()) { writeBehind = cache.getCacheManager().createTerracottaWriteBehind(cache); } else if (cache.getCacheConfiguration().getPersistenceConfiguration() != null && cache.getCacheConfiguration().getPersistenceConfiguration().getStrategy() == Strategy.LOCALRESTARTABLE) { writeBehind = cache.getCacheManager().getFeaturesManager().createWriteBehind(cache); } else { writeBehind = new WriteBehindQueueManager(cache.getCacheConfiguration()); } }
/** * {@inheritDoc} */ public void delete(final CacheEntry entry) { readLock.lock(); try { getQueue(entry.getKey()).delete(entry); } finally { readLock.unlock(); } }
/** * {@inheritDoc} */ public void delete(final CacheEntry entry) { readLock.lock(); try { getQueue(entry.getKey()).delete(entry); } finally { readLock.unlock(); } }
/** * {@inheritDoc} */ public void write(final Element element) { readLock.lock(); try { getQueue(element.getKey()).write(element); } finally { readLock.unlock(); } }
/** * {@inheritDoc} */ public void delete(final CacheEntry entry) { readLock.lock(); try { getQueue(entry.getKey()).delete(entry); } finally { readLock.unlock(); } }
/** * {@inheritDoc} */ public void write(final Element element) { readLock.lock(); try { getQueue(element.getKey()).write(element); } finally { readLock.unlock(); } }