Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5120

Expose EmbeddedCacheManager/Cache via JCacheManager/JCache unwrap(...) methods

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 7.1.0.Final
    • 7.0.3.Final
    • JCache
    • 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);
      

      Attachments

        Activity

          People

            rh-ee-galder Galder ZamarreƱo
            pferraro@redhat.com Paul Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: