Class CopyCacheProxy<K,V>
- java.lang.Object
-
- org.cache2k.jcache.provider.generic.storeByValueSimulation.TransformingCacheProxy<K,V,K,V>
-
- org.cache2k.jcache.provider.generic.storeByValueSimulation.CopyCacheProxy<K,V>
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<javax.cache.Cache.Entry<K,V>>
,javax.cache.Cache<K,V>
public class CopyCacheProxy<K,V> extends TransformingCacheProxy<K,V,K,V>
Cache proxy that expects the transformers keep the type but copy the objects. Copying could be done e.g. cloning and serialization or can be skipped in case of immutable types.- Author:
- Jens Wilke
-
-
Field Summary
-
Fields inherited from class org.cache2k.jcache.provider.generic.storeByValueSimulation.TransformingCacheProxy
cache, keyTransformer, passingKeyTransformer, passingValueTransformer, valueTransformer
-
-
Constructor Summary
Constructors Constructor Description CopyCacheProxy(javax.cache.Cache<K,V> cache, ObjectTransformer<K,K> keyTransformer, ObjectTransformer<V,V> valueTransformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Delegates to wrapped cache.<C extends javax.cache.configuration.Configuration<K,V>>
CgetConfiguration(Class<C> clazz)
Delegates to the wrapped cache.void
registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Delegates to wrapped cache.-
Methods inherited from class org.cache2k.jcache.provider.generic.storeByValueSimulation.TransformingCacheProxy
clear, close, containsKey, get, getAll, getAndPut, getAndRemove, getAndReplace, getCacheManager, getName, getWrappedCache, invoke, invokeAll, isClosed, iterator, loadAll, put, putAll, putIfAbsent, remove, remove, removeAll, removeAll, replace, replace, toString, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
CopyCacheProxy
public CopyCacheProxy(javax.cache.Cache<K,V> cache, ObjectTransformer<K,K> keyTransformer, ObjectTransformer<V,V> valueTransformer)
-
-
Method Detail
-
getConfiguration
public <C extends javax.cache.configuration.Configuration<K,V>> C getConfiguration(Class<C> clazz)
Delegates to the wrapped cache. Wrap configuration and return true on store by value
-
registerCacheEntryListener
public void registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Delegates to wrapped cache.
-
-