Class AsyncReplicationCache<K,V>
java.lang.Object
com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
com.atlassian.cache.hazelcast.asyncinvalidation.AsyncReplicationCache<K,V>
- All Implemented Interfaces:
com.atlassian.cache.Cache<K,,V> com.atlassian.cache.ManagedCache,com.atlassian.cache.ReadThroughCache<K,V>
public final class AsyncReplicationCache<K,V>
extends com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
An implementation of
Cache that is backed by a local cache, and which publishes changes
to the cache entries via invalidations and replications.- Since:
- 8.4
- See Also:
-
Field Summary
Fields inherited from class com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
cacheManager, name -
Constructor Summary
ConstructorsConstructorDescriptionAsyncReplicationCache(com.atlassian.cache.Cache<K, V> localCache, com.atlassian.cache.ManagedCache localManagedCache, CacheInvalidator<K> invalidator, CacheReplicator<K, V> replicator) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(com.atlassian.cache.CacheEntryListener<K, V> listener, boolean includeValues) voidclear()booleancontainsKey(K key) getKeys()protected com.atlassian.cache.ManagedCachebooleanbooleanisLocal()final booleanbooleanprotected voidonClear()protected voidprotected voidvoidputIfAbsent(K key, V value) voidbooleanvoidvoidremoveListener(com.atlassian.cache.CacheEntryListener<K, V> listener) booleanMethods inherited from class com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, getName, getStatistics, isStatisticsEnabled, setStatistics, updateExpireAfterAccess, updateExpireAfterWrite, updateMaxEntriesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.cache.ManagedCache
getCacheCollectorMethods inherited from interface com.atlassian.cache.ReadThroughCache
getName
-
Constructor Details
-
AsyncReplicationCache
public AsyncReplicationCache(com.atlassian.cache.Cache<K, V> localCache, com.atlassian.cache.ManagedCache localManagedCache, CacheInvalidator<K> invalidator, CacheReplicator<K, V> replicator)
-
-
Method Details
-
isReplicateViaCopy
public boolean isReplicateViaCopy()- Specified by:
isReplicateViaCopyin interfacecom.atlassian.cache.ManagedCache- Overrides:
isReplicateViaCopyin classcom.atlassian.cache.hazelcast.ManagedHybridCacheSupport
-
onPut
-
onRemove
-
onClear
protected void onClear() -
clear
public void clear()- Specified by:
clearin interfacecom.atlassian.cache.ManagedCache
-
isReplicateAsynchronously
public final boolean isReplicateAsynchronously() -
put
- Specified by:
putin interfacecom.atlassian.cache.Cache<K,V>
-
putIfAbsent
- Specified by:
putIfAbsentin interfacecom.atlassian.cache.Cache<K,V>
-
remove
- Specified by:
removein interfacecom.atlassian.cache.ReadThroughCache<K,V>
-
remove
- Specified by:
removein interfacecom.atlassian.cache.ReadThroughCache<K,V>
-
removeAll
public void removeAll()- Specified by:
removeAllin interfacecom.atlassian.cache.ReadThroughCache<K,V>
-
replace
- Specified by:
replacein interfacecom.atlassian.cache.Cache<K,V>
-
isLocal
public boolean isLocal()- Specified by:
isLocalin interfacecom.atlassian.cache.ManagedCache- Overrides:
isLocalin classcom.atlassian.cache.hazelcast.ManagedHybridCacheSupport
-
getLocalCache
protected com.atlassian.cache.ManagedCache getLocalCache()- Specified by:
getLocalCachein classcom.atlassian.cache.hazelcast.ManagedHybridCacheSupport
-
isFlushable
public boolean isFlushable()- Specified by:
isFlushablein interfacecom.atlassian.cache.ManagedCache
-
containsKey
- Specified by:
containsKeyin interfacecom.atlassian.cache.ReadThroughCache<K,V>
-
getKeys
- Specified by:
getKeysin interfacecom.atlassian.cache.ReadThroughCache<K,V>
-
get
- Specified by:
getin interfacecom.atlassian.cache.ReadThroughCache<K,V>
-
get
- Specified by:
getin interfacecom.atlassian.cache.ReadThroughCache<K,V>
-
getBulk
- Specified by:
getBulkin interfacecom.atlassian.cache.ReadThroughCache<K,V>
-
addListener
public void addListener(com.atlassian.cache.CacheEntryListener<K, V> listener, boolean includeValues) - Specified by:
addListenerin interfacecom.atlassian.cache.Cache<K,V>
-
removeListener
- Specified by:
removeListenerin interfacecom.atlassian.cache.Cache<K,V>
-