public class MemoryCacheManager extends AbstractCacheManager
cacheCreationLocks, caches, cacheSettingsDefaultsProvider| Constructor and Description |
|---|
MemoryCacheManager() |
MemoryCacheManager(CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider) |
| 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 <K,V> ManagedCache |
createComputingCache(String name,
CacheSettings settings,
CacheLoader<K,V> loader,
DelegatingCache.CreateFunction createFunction) |
protected ManagedCache |
createSimpleCache(String name,
CacheSettings settings)
Creates a cache with no loader, i.e.
|
protected <K,V> ManagedCache |
createSimpleCache(String name,
CacheSettings settings,
DelegatingCache.CreateFunction createFunction) |
<K,V> Cache<K,V> |
getCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings)
Returns the cache with the given name, loader and required cache settings, creates it if necessary.
|
<K,V> Cache<K,V> |
getCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings,
DelegatingCache.CreateFunction createFunction) |
<V> CachedReference<V> |
getCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
Returns a Cached Reference, creating it if necessary.
|
<V> CachedReference<V> |
getCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings,
DelegatingCachedReference.CreateFunction createFunction) |
protected void |
putCacheInMap(String name,
Supplier<ManagedCache> supplier)
Use this method to store values in caches map to allow read/write synchronization in @
JMXMemoryCacheManager |
flushCaches, getCache, getCache, getCache, getCache, getCachedReference, getCachedReference, getCachedReference, getCaches, getManagedCache, getManagedCaches, mergeSettings, shutdown@Nonnull public MemoryCacheManager()
public MemoryCacheManager(CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
@Nonnull public <K,V> Cache<K,V> getCache(@Nonnull String name, @Nullable CacheLoader<K,V> loader, @Nonnull CacheSettings settings)
CacheFactorygetCache in interface CacheFactorygetCache in class AbstractCacheManagername - the name of the cacheloader - the loader that will be used to provide values for keys that will be added to the cache. null indicates no loadersettings - the cache settings that are required to be set if the cache is created.@Nonnull public <K,V> Cache<K,V> getCache(@Nonnull String name, @Nullable CacheLoader<K,V> loader, @Nonnull CacheSettings settings, @Nonnull DelegatingCache.CreateFunction createFunction)
@Nonnull public <V> CachedReference<V> getCachedReference(@Nonnull String name, @Nonnull Supplier<V> supplier, @Nonnull CacheSettings settings)
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 settingspublic <V> CachedReference<V> getCachedReference(@Nonnull String name, @Nonnull Supplier<V> supplier, @Nonnull CacheSettings settings, @Nonnull DelegatingCachedReference.CreateFunction createFunction)
protected ManagedCache createSimpleCache(@Nonnull String name, @Nonnull CacheSettings settings)
AbstractCacheManagercreateSimpleCache in class AbstractCacheManagername - the name to give the cache (required)protected <K,V> ManagedCache createSimpleCache(@Nonnull String name, @Nonnull CacheSettings settings, @Nonnull DelegatingCache.CreateFunction createFunction)
protected <K,V> ManagedCache createComputingCache(@Nonnull String name, @Nonnull CacheSettings settings, @Nullable CacheLoader<K,V> loader)
AbstractCacheManagercreateComputingCache in class AbstractCacheManagerprotected <K,V> ManagedCache createComputingCache(@Nonnull String name, @Nonnull CacheSettings settings, CacheLoader<K,V> loader, @Nonnull DelegatingCache.CreateFunction createFunction)
protected void putCacheInMap(@Nonnull String name, @Nonnull Supplier<ManagedCache> supplier)
JMXMemoryCacheManagername - cache namesupplier - supplier containing cache to addCopyright © 2018 Atlassian. All rights reserved.