Class AsyncInvalidationCache<K,V>
- java.lang.Object
-
- com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
-
- com.atlassian.cache.hazelcast.asyncinvalidation.AsyncInvalidationCache<K,V>
-
- All Implemented Interfaces:
com.atlassian.cache.Cache<K,V>,com.atlassian.cache.ManagedCache
public final class AsyncInvalidationCache<K,V> extends com.atlassian.cache.hazelcast.ManagedHybridCacheSupport implements com.atlassian.cache.Cache<K,V>An implementation ofCachethat is backed by a local cache, and which publishes cache invalidation events when certain mutable operations are performed.
-
-
Constructor Summary
Constructors Constructor Description AsyncInvalidationCache(String cacheName, com.atlassian.cache.hazelcast.HazelcastCacheManager cacheManager, com.atlassian.cache.Cache<K,V> localCache, com.atlassian.cache.ManagedCache localManagedCache, CacheInvalidator<K> invalidator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(com.atlassian.cache.CacheEntryListener<K,V> listener, boolean includeValues)voidclear()booleancontainsKey(K key)Vget(K key)Vget(K key, com.atlassian.cache.Supplier<? extends V> valueSupplier)Map<K,V>getBulk(Set<K> keys, Function<Set<K>,Map<K,V>> valuesSupplier)Collection<K>getKeys()protected com.atlassian.cache.ManagedCachegetLocalCache()booleanisFlushable()booleanisReplicateAsynchronously()voidput(K key, V value)VputIfAbsent(K key, V value)voidremove(K key)booleanremove(K key, V value)voidremoveAll()voidremoveListener(com.atlassian.cache.CacheEntryListener<K,V> listener)booleanreplace(K key, V oldValue, V newValue)-
Methods inherited from class com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, getName, getStatistics, isLocal, isReplicateViaCopy, isStatisticsEnabled, setStatistics, updateExpireAfterAccess, updateExpireAfterWrite, updateMaxEntries
-
-
-
-
Constructor Detail
-
AsyncInvalidationCache
public AsyncInvalidationCache(String cacheName, com.atlassian.cache.hazelcast.HazelcastCacheManager cacheManager, com.atlassian.cache.Cache<K,V> localCache, com.atlassian.cache.ManagedCache localManagedCache, CacheInvalidator<K> invalidator)
-
-
Method Detail
-
getLocalCache
protected com.atlassian.cache.ManagedCache getLocalCache()
- Specified by:
getLocalCachein classcom.atlassian.cache.hazelcast.ManagedHybridCacheSupport
-
clear
public void clear()
- Specified by:
clearin interfacecom.atlassian.cache.ManagedCache
-
isFlushable
public boolean isFlushable()
- Specified by:
isFlushablein interfacecom.atlassian.cache.ManagedCache
-
isReplicateAsynchronously
public boolean isReplicateAsynchronously()
- Specified by:
isReplicateAsynchronouslyin interfacecom.atlassian.cache.ManagedCache
-
containsKey
public boolean containsKey(K key)
-
getKeys
public Collection<K> getKeys()
-
removeAll
public void removeAll()
-
addListener
public void addListener(com.atlassian.cache.CacheEntryListener<K,V> listener, boolean includeValues)
-
-