Package org.infinispan.jcache.embedded
Class JCacheManager
- java.lang.Object
-
- org.infinispan.jcache.AbstractJCacheManager
-
- org.infinispan.jcache.embedded.JCacheManager
-
- All Implemented Interfaces:
Closeable,AutoCloseable,javax.cache.CacheManager
public class JCacheManager extends org.infinispan.jcache.AbstractJCacheManagerInfinispan's implementation ofCacheManager.It is possible to manipulate the configuration programmatically by supplying objects through the properties parameter. The following list contains the supported special property names:
- org.infinispan.configuration.parsing.ConfigurationBuilderHolder an instance of
ConfigurationBuilderHolderthat will be used instead of attempting to load the configuration file specified by the uri parameter. - org.infinispan.configuration.global.GlobalConfigurationBuilder an instance of
GlobalConfigurationBuilderthat will be used as thebase GlobalConfigurationBuilder before parsing the file specified by the uri parameter. - org.infinispan.configuration.global.GlobalConfigurationBuilder-Consumer an instance of
Consumerthat will be used to manipulate the global configuration after parsing the file specified by the uri parameter. - org.infinispan.configuration.cache.Configuration-Function an instance of
Functionthat will be used to obtain the configuration for a cache. If the function returns null, it will use the default configuration.
- Since:
- 5.3
- Author:
- Vladimir Blagojevic, Galder ZamarreƱo
-
-
Field Summary
Fields Modifier and Type Field Description static StringCACHE_CONFIGURATION_FUNCTIONstatic StringGLOBAL_CONFIGURATION_CONSUMER
-
Constructor Summary
Constructors Constructor Description JCacheManager(URI uri, ClassLoader classLoader, javax.cache.spi.CachingProvider provider, Properties properties)Create a new InfinispanCacheManager given a cache name and aClassLoader.JCacheManager(URI uri, org.infinispan.manager.EmbeddedCacheManager cacheManager, javax.cache.spi.CachingProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <K,V,I extends org.infinispan.commons.api.BasicCache<K,V>>
org.infinispan.jcache.AbstractJCache<K,V>create(I ispnCache)protected <K,V,C extends javax.cache.configuration.Configuration<K,V>>
org.infinispan.jcache.AbstractJCache<K,V>create(String cacheName, C configuration)protected Iterable<String>delegateCacheNames()protected booleandelegateIsClosed()protected voiddelegateLogIsClosed()protected <K,V>
voiddelegateRemoveCache(org.infinispan.jcache.AbstractJCache<K,V> jcache)protected voiddelegateStop()ClassLoadergetClassLoader()<T> Tunwrap(Class<T> clazz)-
Methods inherited from class org.infinispan.jcache.AbstractJCacheManager
close, createCache, destroyCache, enableManagement, enableStatistics, finalize, getCache, getCache, getCacheNames, getCachingProvider, getManagedCacheNames, getOrCreateCache, getProperties, getURI, isClosed, registerPredefinedCache
-
-
-
-
Constructor Detail
-
JCacheManager
public JCacheManager(URI uri, ClassLoader classLoader, javax.cache.spi.CachingProvider provider, Properties properties)
Create a new InfinispanCacheManager given a cache name and aClassLoader. Cache name might refer to a file on classpath containing Infinispan configuration file.- Parameters:
uri- identifies the cache managerclassLoader- used to load classes stored in this cache managerproperties- properties used to customize the configuration.
-
JCacheManager
public JCacheManager(URI uri, org.infinispan.manager.EmbeddedCacheManager cacheManager, javax.cache.spi.CachingProvider provider)
-
-
Method Detail
-
unwrap
public <T> T unwrap(Class<T> clazz)
-
getClassLoader
public ClassLoader getClassLoader()
-
delegateLogIsClosed
protected void delegateLogIsClosed()
- Specified by:
delegateLogIsClosedin classorg.infinispan.jcache.AbstractJCacheManager
-
delegateStop
protected void delegateStop()
- Specified by:
delegateStopin classorg.infinispan.jcache.AbstractJCacheManager
-
delegateCacheNames
protected Iterable<String> delegateCacheNames()
- Specified by:
delegateCacheNamesin classorg.infinispan.jcache.AbstractJCacheManager
-
delegateIsClosed
protected boolean delegateIsClosed()
- Specified by:
delegateIsClosedin classorg.infinispan.jcache.AbstractJCacheManager
-
delegateRemoveCache
protected <K,V> void delegateRemoveCache(org.infinispan.jcache.AbstractJCache<K,V> jcache)
- Specified by:
delegateRemoveCachein classorg.infinispan.jcache.AbstractJCacheManager
-
create
protected <K,V,C extends javax.cache.configuration.Configuration<K,V>> org.infinispan.jcache.AbstractJCache<K,V> create(String cacheName, C configuration)
- Specified by:
createin classorg.infinispan.jcache.AbstractJCacheManager
-
create
protected <K,V,I extends org.infinispan.commons.api.BasicCache<K,V>> org.infinispan.jcache.AbstractJCache<K,V> create(I ispnCache)
- Specified by:
createin classorg.infinispan.jcache.AbstractJCacheManager
-
-