|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.cache.impl.AbstractCacheManager
com.atlassian.cache.ehcache.EhCacheManager
public class EhCacheManager
Maintains a mapping of name -> Cache and provides factory methods for creating ad getting caches.
| Field Summary |
|---|
| Fields inherited from class com.atlassian.cache.impl.AbstractCacheManager |
|---|
cacheCreationLocks, caches, cacheSettingsDefaultsProvider |
| Constructor Summary | |
|---|---|
EhCacheManager()
Creates an instance backed by a new instance of CacheManager. |
|
EhCacheManager(net.sf.ehcache.CacheManager delegate,
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
Creates an instance backed by the provided instance of CacheManager. |
|
| Method Summary | ||
|---|---|---|
protected
|
createComputingCache(String name,
CacheSettings settings,
CacheLoader<K,V> loader)
Creates a cache that upon a miss is able to populate itself using the loader. |
|
protected ManagedCache |
createSimpleCache(String name,
CacheSettings settings)
Creates a cache with no loader, i.e. |
|
|
getCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
Returns a Cached Reference, creating it if necessary. |
|
boolean |
isStatisticsEnabled()
|
|
void |
registerMBeans(MBeanServer mBeanServer)
Tells this object to register its JMX MBeans with the given server. |
|
void |
setStatisticsEnabled(boolean statisticsEnabled)
|
|
void |
shutdown()
Shuts down and clean all data of the current instance and its all caches. |
|
void |
unregisterMBeans(MBeanServer mBeanServer)
Tells this object to deregister its JMX MBeans from the given server. |
|
| Methods inherited from class com.atlassian.cache.impl.AbstractCacheManager |
|---|
flushCaches, getCache, getCache, getCache, getCache, getCache, getCachedReference, getCachedReference, getCachedReference, getCaches, getManagedCache, getManagedCaches, mergeSettings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EhCacheManager()
CacheManager.
public EhCacheManager(net.sf.ehcache.CacheManager delegate,
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
CacheManager.
delegate - an Ehcache's cache manager| Method Detail |
|---|
public boolean isStatisticsEnabled()
public void setStatisticsEnabled(boolean statisticsEnabled)
@Nonnull
public <V> CachedReference<V> getCachedReference(@Nonnull
String name,
@Nonnull
Supplier<V> supplier,
@Nonnull
CacheSettings settings)
CacheFactory
getCachedReference in interface CacheFactoryname - the name of the Cached Referencesupplier - the supplier for value to be cached, called if the value needs to be generatedsettings - specifies the required cache settings
protected ManagedCache createSimpleCache(@Nonnull
String name,
@Nonnull
CacheSettings settings)
AbstractCacheManager
createSimpleCache in class AbstractCacheManagername - the name to give the cache (required)
protected <K,V> ManagedCache createComputingCache(@Nonnull
String name,
@Nonnull
CacheSettings settings,
CacheLoader<K,V> loader)
AbstractCacheManager
createComputingCache in class AbstractCacheManagerpublic void shutdown()
CacheManager
shutdown in interface CacheManagershutdown in class AbstractCacheManager
public void registerMBeans(@Nullable
MBeanServer mBeanServer)
MBeanRegistrar
registerMBeans in interface MBeanRegistrarmBeanServer - the server with which to register the MBeans (ignored if null)
public void unregisterMBeans(@Nullable
MBeanServer mBeanServer)
MBeanRegistrar
unregisterMBeans in interface MBeanRegistrarmBeanServer - the server with which to deregister the MBeans (ignored if null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||