Package org.cache2k.jcache.provider
Class JCacheManagerAdapter
- java.lang.Object
-
- org.cache2k.jcache.provider.JCacheManagerAdapter
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,javax.cache.CacheManager
public class JCacheManagerAdapter extends Object implements javax.cache.CacheManager
- Author:
- Jens Wilke
-
-
Constructor Summary
Constructors Constructor Description JCacheManagerAdapter(JCacheProvider p, org.cache2k.CacheManager cm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
<K,V,C extends javax.cache.configuration.Configuration<K,V>>
javax.cache.Cache<K,V>createCache(String cacheName, C cfg)
void
destroyCache(String cacheName)
void
enableManagement(String cacheName, boolean enabled)
void
enableStatistics(String cacheName, boolean enabled)
<K,V>
javax.cache.Cache<K,V>getCache(String cacheName)
<K,V>
javax.cache.Cache<K,V>getCache(String cacheName, Class<K> keyType, Class<V> valueType)
org.cache2k.CacheManager
getCache2kManager()
Iterable<String>
getCacheNames()
javax.cache.spi.CachingProvider
getCachingProvider()
ClassLoader
getClassLoader()
Properties
getProperties()
URI
getURI()
boolean
isClosed()
javax.cache.Cache
resolveCacheWrapper(org.cache2k.Cache c2kCache)
Return the JCache wrapper for a c2k cache.<T> T
unwrap(Class<T> type)
-
-
-
Constructor Detail
-
JCacheManagerAdapter
public JCacheManagerAdapter(JCacheProvider p, org.cache2k.CacheManager cm)
-
-
Method Detail
-
getCachingProvider
public javax.cache.spi.CachingProvider getCachingProvider()
- Specified by:
getCachingProvider
in interfacejavax.cache.CacheManager
-
getURI
public URI getURI()
- Specified by:
getURI
in interfacejavax.cache.CacheManager
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfacejavax.cache.CacheManager
-
getProperties
public Properties getProperties()
- Specified by:
getProperties
in interfacejavax.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 interfacejavax.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 interfacejavax.cache.CacheManager
-
getCache
public <K,V> javax.cache.Cache<K,V> getCache(String cacheName)
- Specified by:
getCache
in interfacejavax.cache.CacheManager
-
getCacheNames
public Iterable<String> getCacheNames()
- Specified by:
getCacheNames
in interfacejavax.cache.CacheManager
-
destroyCache
public void destroyCache(String cacheName)
- Specified by:
destroyCache
in interfacejavax.cache.CacheManager
-
enableManagement
public void enableManagement(String cacheName, boolean enabled)
- Specified by:
enableManagement
in interfacejavax.cache.CacheManager
-
enableStatistics
public void enableStatistics(String cacheName, boolean enabled)
- Specified by:
enableStatistics
in interfacejavax.cache.CacheManager
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfacejavax.cache.CacheManager
- Specified by:
close
in interfaceCloseable
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfacejavax.cache.CacheManager
-
unwrap
public <T> T unwrap(Class<T> type)
- Specified by:
unwrap
in interfacejavax.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.
-
-