Class JCacheManagerAdapter

  • All Implemented Interfaces:
    Closeable, AutoCloseable, javax.cache.CacheManager

    public class JCacheManagerAdapter
    extends Object
    implements javax.cache.CacheManager
    Author:
    Jens Wilke
    • Constructor Detail

      • JCacheManagerAdapter

        public JCacheManagerAdapter​(JCacheProvider p,
                                    org.cache2k.CacheManager cm)
    • Method Detail

      • getCachingProvider

        public javax.cache.spi.CachingProvider getCachingProvider()
        Specified by:
        getCachingProvider in interface javax.cache.CacheManager
      • getURI

        public URI getURI()
        Specified by:
        getURI in interface javax.cache.CacheManager
      • getClassLoader

        public ClassLoader getClassLoader()
        Specified by:
        getClassLoader in interface javax.cache.CacheManager
      • getProperties

        public Properties getProperties()
        Specified by:
        getProperties in interface javax.cache.CacheManager
      • createCache

        public <K,​V,​C extends javax.cache.configuration.Configuration<K,​V>> javax.cache.Cache<K,​V> createCache​(String cacheName,
                                                                                                                                       C cfg)
                                                                                                                                throws IllegalArgumentException
        Specified by:
        createCache in interface javax.cache.CacheManager
        Throws:
        IllegalArgumentException
      • getCache

        public <K,​V> javax.cache.Cache<K,​V> getCache​(String cacheName,
                                                                 Class<K> keyType,
                                                                 Class<V> valueType)
        Specified by:
        getCache in interface javax.cache.CacheManager
      • getCache

        public <K,​V> javax.cache.Cache<K,​V> getCache​(String cacheName)
        Specified by:
        getCache in interface javax.cache.CacheManager
      • getCacheNames

        public Iterable<String> getCacheNames()
        Specified by:
        getCacheNames in interface javax.cache.CacheManager
      • destroyCache

        public void destroyCache​(String cacheName)
        Specified by:
        destroyCache in interface javax.cache.CacheManager
      • enableManagement

        public void enableManagement​(String cacheName,
                                     boolean enabled)
        Specified by:
        enableManagement in interface javax.cache.CacheManager
      • enableStatistics

        public void enableStatistics​(String cacheName,
                                     boolean enabled)
        Specified by:
        enableStatistics in interface javax.cache.CacheManager
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface javax.cache.CacheManager
        Specified by:
        close in interface Closeable
      • isClosed

        public boolean isClosed()
        Specified by:
        isClosed in interface javax.cache.CacheManager
      • unwrap

        public <T> T unwrap​(Class<T> type)
        Specified by:
        unwrap in interface javax.cache.CacheManager
      • getCache2kManager

        public org.cache2k.CacheManager getCache2kManager()
      • resolveCacheWrapper

        public javax.cache.Cache resolveCacheWrapper​(org.cache2k.Cache c2kCache)
        Return the JCache wrapper for a c2k cache.