Package org.infinispan.jcache
Class AbstractJCacheManager
- java.lang.Object
-
- org.infinispan.jcache.AbstractJCacheManager
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,javax.cache.CacheManager
public abstract class AbstractJCacheManager extends Object implements javax.cache.CacheManager
Infinispan's implementation ofCacheManager
.- Author:
- Vladimir Blagojevic, Galder ZamarreƱo
-
-
Field Summary
Fields Modifier and Type Field Description protected Properties
properties
-
Constructor Summary
Constructors Constructor Description AbstractJCacheManager(URI uri, ClassLoader classLoader, javax.cache.spi.CachingProvider provider, Properties properties, boolean managedCacheManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
protected abstract <K,V,I extends org.infinispan.commons.api.BasicCache<K,V>>
AbstractJCache<K,V>create(I ispnCache)
protected abstract <K,V,C extends javax.cache.configuration.Configuration<K,V>>
AbstractJCache<K,V>create(String cacheName, C configuration)
<K,V,C extends javax.cache.configuration.Configuration<K,V>>
javax.cache.Cache<K,V>createCache(String cacheName, C configuration)
protected abstract Iterable<String>
delegateCacheNames()
protected abstract boolean
delegateIsClosed()
protected abstract void
delegateLogIsClosed()
protected abstract <K,V>
voiddelegateRemoveCache(AbstractJCache<K,V> cacheName)
protected abstract void
delegateStop()
void
destroyCache(String cacheName)
void
enableManagement(String cacheName, boolean enabled)
void
enableStatistics(String cacheName, boolean enabled)
protected void
finalize()
Avoid weak references to this cache manager being garbage collected without being shutdown.<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)
Iterable<String>
getCacheNames()
javax.cache.spi.CachingProvider
getCachingProvider()
protected Set<String>
getManagedCacheNames()
<K,V,I extends org.infinispan.commons.api.BasicCache<K,V>>
javax.cache.Cache<K,V>getOrCreateCache(String cacheName, I ispnCache)
Properties
getProperties()
URI
getURI()
boolean
isClosed()
protected <K,V>
voidregisterPredefinedCache(String cacheName, AbstractJCache<K,V> cache)
-
-
-
Field Detail
-
properties
protected Properties properties
-
-
Constructor Detail
-
AbstractJCacheManager
public AbstractJCacheManager(URI uri, ClassLoader classLoader, javax.cache.spi.CachingProvider provider, Properties properties, boolean managedCacheManager)
-
-
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
-
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 configuration)
- Specified by:
createCache
in interfacejavax.cache.CacheManager
-
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
-
finalize
protected void finalize() throws Throwable
Avoid weak references to this cache manager being garbage collected without being shutdown.
-
getOrCreateCache
public <K,V,I extends org.infinispan.commons.api.BasicCache<K,V>> javax.cache.Cache<K,V> getOrCreateCache(String cacheName, I ispnCache)
-
registerPredefinedCache
protected <K,V> void registerPredefinedCache(String cacheName, AbstractJCache<K,V> cache)
-
delegateLogIsClosed
protected abstract void delegateLogIsClosed()
-
delegateStop
protected abstract void delegateStop()
-
delegateIsClosed
protected abstract boolean delegateIsClosed()
-
delegateRemoveCache
protected abstract <K,V> void delegateRemoveCache(AbstractJCache<K,V> cacheName)
-
create
protected abstract <K,V,C extends javax.cache.configuration.Configuration<K,V>> AbstractJCache<K,V> create(String cacheName, C configuration)
-
create
protected abstract <K,V,I extends org.infinispan.commons.api.BasicCache<K,V>> AbstractJCache<K,V> create(I ispnCache)
-
-