@ParametersAreNonnullByDefault public class EhCacheManager extends AbstractCacheManager implements MBeanRegistrar
cacheCreationLocks, caches, cacheSettingsDefaultsProvider| Constructor and Description |
|---|
EhCacheManager()
Deprecated.
|
EhCacheManager(net.sf.ehcache.CacheManager delegate,
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
Deprecated.
|
EhCacheManager(net.sf.ehcache.CacheManager delegate,
EhCacheReplicatorConfigFactory replicatorConfigFactory,
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
Creates an instance backed by the provided instance of
CacheManager. |
EhCacheManager(net.sf.ehcache.CacheManager delegate,
EhCacheReplicatorConfigFactory replicatorConfigFactory,
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider,
ValueProcessor valueProcessor)
Creates an instance backed by the provided instance of
CacheManager. |
| Modifier and Type | Method and Description |
|---|---|
protected <K,V> ManagedCache |
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.
|
<V> CachedReference<V> |
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.
|
flushCaches, getCache, getCache, getCache, getCache, getCache, getCachedReference, getCachedReference, getCachedReference, getCaches, getManagedCache, getManagedCaches, mergeSettings@Deprecated public EhCacheManager()
EhCacheManager(CacheManager, EhCacheReplicatorConfigFactory, CacheSettingsDefaultsProvider)CacheManager and a RMICacheReplicatorConfigFactory.@Deprecated public EhCacheManager(net.sf.ehcache.CacheManager delegate, @Nullable CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
EhCacheManager(CacheManager, EhCacheReplicatorConfigFactory, CacheSettingsDefaultsProvider)CacheManager and a RMICacheReplicatorConfigFactory.delegate - an Ehcache's cache managerpublic EhCacheManager(net.sf.ehcache.CacheManager delegate,
@Nullable
EhCacheReplicatorConfigFactory replicatorConfigFactory,
@Nullable
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
CacheManager.delegate - an Ehcache's cache managerpublic EhCacheManager(net.sf.ehcache.CacheManager delegate,
@Nullable
EhCacheReplicatorConfigFactory replicatorConfigFactory,
@Nullable
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider,
@Nullable
ValueProcessor valueProcessor)
CacheManager.delegate - an Ehcache's cache managerpublic boolean isStatisticsEnabled()
public void setStatisticsEnabled(boolean statisticsEnabled)
@Nonnull public <V> CachedReference<V> getCachedReference(@Nonnull String name, @Nonnull Supplier<V> supplier, @Nonnull CacheSettings settings)
CacheFactorygetCachedReference 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 settingsprotected ManagedCache createSimpleCache(@Nonnull String name, @Nonnull CacheSettings settings)
AbstractCacheManagercreateSimpleCache 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)
AbstractCacheManagercreateComputingCache in class AbstractCacheManagerpublic void shutdown()
CacheManagershutdown in interface CacheManagershutdown in class AbstractCacheManagerpublic void registerMBeans(@Nullable MBeanServer mBeanServer)
MBeanRegistrarregisterMBeans in interface MBeanRegistrarmBeanServer - the server with which to register the MBeans (ignored if null)public void unregisterMBeans(@Nullable MBeanServer mBeanServer)
MBeanRegistrarunregisterMBeans in interface MBeanRegistrarmBeanServer - the server with which to deregister the MBeans (ignored if null)Copyright © 2018 Atlassian. All rights reserved.