/** * {@inheritDoc} */ public void performOperation(CacheLoaderWriter<K, V> cacheLoaderWriter) throws BulkCacheWritingException, Exception { cacheLoaderWriter.deleteAll(entries); }
/** * Creates a new {@code CacheLoadingException} with the provided exception as cause. * * @param e the cause * @return a cache loading exception */ public static CacheLoadingException newCacheLoadingException(Exception e) { return new CacheLoadingException(e); }
/** * Creates a new {@code CacheWritingException} with the provided exception as cause. * * @param e the cause * @return a cache writing exception */ public static CacheWritingException newCacheWritingException(Exception e) { return new CacheWritingException(e); }
@Override public void write(K key, V value) throws Exception { delegate.write(key, value); }
@Override public V load(K key) throws Exception { return delegate.load(key); }
@Override public void delete(K key) throws Exception { delegate.delete(key); }
@Override public Map<K, V> loadAll(Iterable<? extends K> keys) throws BulkCacheLoadingException, Exception { return delegate.loadAll(keys); }
@Override public void writeAll(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) throws BulkCacheWritingException, Exception { delegate.writeAll(entries); }
/** * Creates a new {@code CacheLoadingException} with the provided exception as cause and a suppressed one. * * @param e the cause * @param suppressed the suppressed exception to add to the new exception * @return a cache loading exception */ public static CacheLoadingException newCacheLoadingException(Exception e, Exception suppressed) { CacheLoadingException ne = new CacheLoadingException(e); ne.addSuppressed(e); return ne; } }
/** * Creates a new {@code CacheWritingException} with the provided exception as cause and a suppressed one. * * @param e the cause * @param suppressed the suppressed exception to add to the new exception * @return a cache writing exception */ public static CacheWritingException newCacheWritingException(Exception e, Exception suppressed) { CacheWritingException ne = new CacheWritingException(e); ne.addSuppressed(suppressed); return ne; }
@Override public void close() throws Exception { cacheLoaderWriterProvider.releaseCacheLoaderWriter(alias, loaderWriter); } });
@Override public void performOperation(CacheLoaderWriter<K, V> cacheWriter) throws Exception { cacheWriter.write(key, value); }
@Override public void deleteAll(Iterable<? extends K> keys) throws BulkCacheWritingException, Exception { delegate.deleteAll(keys); } }
@Override public Map<K, V> loadAllAlways(Iterable<? extends K> keys) throws BulkCacheLoadingException, Exception { return delegate.loadAll(keys); }
@Override public void writeAll(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) throws Exception { CacheLoaderWriter.super.writeAll(entries); }
@Override public void deleteAll(Iterable<? extends K> keys) throws Exception { CacheLoaderWriter.super.deleteAll(keys); }
@Override public synchronized Map<K, V> loadAll(Iterable<? extends K> keys) throws Exception { return CacheLoaderWriter.super.loadAll(keys); }
@Override public void writeAll(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) throws Exception { CacheLoaderWriter.super.writeAll(entries); }
@Override public void deleteAll(Iterable<? extends K> keys) throws Exception { CacheLoaderWriter.super.deleteAll(keys); }
@Override public synchronized Map<K, V> loadAll(Iterable<? extends K> keys) throws Exception { return CacheLoaderWriter.super.loadAll(keys); }