com.atlassian.cache.hazelcast
Class HazelcastCacheManager
java.lang.Object
com.atlassian.cache.impl.AbstractCacheManager
com.atlassian.cache.hazelcast.HazelcastCacheManager
- All Implemented Interfaces:
- CacheFactory, CacheManager
public class HazelcastCacheManager
- extends AbstractCacheManager
Hazelcast implementation of the CacheManager contract
|
Method Summary |
protected void |
checkSettingsAreCompatible(String name,
CacheSettings settings)
|
protected com.hazelcast.config.MapConfig |
configureMap(String mapName,
CacheSettings settings)
|
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
|
createDistributedCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings)
|
protected
|
createDistributedCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
|
protected
|
createHybridCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings)
|
protected
|
createHybridCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
|
protected ManagedCache |
createSimpleCache(String name,
CacheSettings settings)
Creates a cache with no loader, i.e. |
protected
|
doCreateCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
|
|
getCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
Returns a Cached Reference, creating it if necessary. |
| Methods inherited from class com.atlassian.cache.impl.AbstractCacheManager |
flushCaches, getCache, getCache, getCache, getCache, getCache, getCachedReference, getCachedReference, getCachedReference, getCaches, getManagedCache, getManagedCaches, mergeSettings, shutdown |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PREFIX
protected static final String PREFIX
- See Also:
- Constant Field Values
PREFIX_CACHE
protected static final String PREFIX_CACHE
- See Also:
- Constant Field Values
PREFIX_CACHE_REFERENCE
protected static final String PREFIX_CACHE_REFERENCE
- See Also:
- Constant Field Values
HazelcastCacheManager
public HazelcastCacheManager(com.hazelcast.core.HazelcastInstance hazelcast,
CacheFactory localCacheFactory,
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
createComputingCache
protected <K,V> ManagedCache createComputingCache(@Nonnull
String name,
@Nonnull
CacheSettings settings,
CacheLoader<K,V> loader)
- Description copied from class:
AbstractCacheManager
- Creates a cache that upon a miss is able to populate itself using the loader.
- Specified by:
createComputingCache in class AbstractCacheManager
- Returns:
- a non-null cache
createSimpleCache
protected ManagedCache createSimpleCache(@Nonnull
String name,
@Nonnull
CacheSettings settings)
- Description copied from class:
AbstractCacheManager
- Creates a cache with no loader, i.e. one populated via explicit puts.
- Specified by:
createSimpleCache in class AbstractCacheManager
- Parameters:
name - the name to give the cache (required)
- Returns:
- a non-null cache
getCachedReference
@Nonnull
public <V> CachedReference<V> getCachedReference(@Nonnull
String name,
@Nonnull
Supplier<V> supplier,
@Nonnull
CacheSettings settings)
- Description copied from interface:
CacheFactory
- Returns a Cached Reference, creating it if necessary.
- Parameters:
name - 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
- Returns:
- the Cached Reference
checkSettingsAreCompatible
protected void checkSettingsAreCompatible(String name,
CacheSettings settings)
configureMap
protected com.hazelcast.config.MapConfig configureMap(String mapName,
CacheSettings settings)
createDistributedCache
protected <K,V> Cache<K,V> createDistributedCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings)
createDistributedCachedReference
protected <V> CachedReference<V> createDistributedCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
createHybridCache
protected <K,V> Cache<K,V> createHybridCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings)
createHybridCachedReference
protected <V> CachedReference<V> createHybridCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
doCreateCachedReference
protected <V> CachedReference<V> doCreateCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
Copyright © 2015 Atlassian. All rights reserved.