Details
-
Enhancement
-
Resolution: Done
-
Major
-
7.0.3.Final
-
None
Description
The JSR-107 spec includes the CacheManager.unwrap(Class) and Cache.unwrap(Class) methods to allow access to underlying caching implementation. Currently, I can only unwrap the Cache/CacheManager instance to the concrete JCache/JCacheManager implementations. However, these classes do not expose the underlying infinispan Cache/EmbeddedCacheManager.
Ideally, I should be able to do the following:
javax.cache.Cache<K, V> jcache = Caching.getCache("name", ...);
org.infinispan.Cache<K, V> icache = jcache.unwrap(org.infinispan.Cache.class);
or
CacheManager jmanager = Caching.getCachingProvider().getCacheManager(); EmbeddedCacheManager imanager = jmanager.unwrap(EmbeddedCacheManager.class); CacheContainer container = jmanager.unwrap(CacheContainer.class);