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 TypeMethodDescriptionvoid
addListener
(com.atlassian.cache.CacheEntryListener<K, V> listener, boolean includeValues) void
clear()
boolean
containsKey
(K key) getKeys()
protected com.atlassian.cache.ManagedCache
boolean
boolean
isLocal()
final boolean
boolean
protected void
onClear()
protected void
protected void
void
putIfAbsent
(K key, V value) void
boolean
void
void
removeListener
(com.atlassian.cache.CacheEntryListener<K, V> listener) boolean
Methods inherited from class com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, getName, getStatistics, isStatisticsEnabled, setStatistics, updateExpireAfterAccess, updateExpireAfterWrite, updateMaxEntries
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.cache.ManagedCache
getCacheCollector
Methods 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:
isReplicateViaCopy
in interfacecom.atlassian.cache.ManagedCache
- Overrides:
isReplicateViaCopy
in classcom.atlassian.cache.hazelcast.ManagedHybridCacheSupport
-
onPut
-
onRemove
-
onClear
protected void onClear() -
clear
public void clear()- Specified by:
clear
in interfacecom.atlassian.cache.ManagedCache
-
isReplicateAsynchronously
public final boolean isReplicateAsynchronously() -
put
- Specified by:
put
in interfacecom.atlassian.cache.Cache<K,
V>
-
putIfAbsent
- Specified by:
putIfAbsent
in interfacecom.atlassian.cache.Cache<K,
V>
-
remove
- Specified by:
remove
in interfacecom.atlassian.cache.ReadThroughCache<K,
V>
-
remove
- Specified by:
remove
in interfacecom.atlassian.cache.ReadThroughCache<K,
V>
-
removeAll
public void removeAll()- Specified by:
removeAll
in interfacecom.atlassian.cache.ReadThroughCache<K,
V>
-
replace
- Specified by:
replace
in interfacecom.atlassian.cache.Cache<K,
V>
-
isLocal
public boolean isLocal()- Specified by:
isLocal
in interfacecom.atlassian.cache.ManagedCache
- Overrides:
isLocal
in classcom.atlassian.cache.hazelcast.ManagedHybridCacheSupport
-
getLocalCache
protected com.atlassian.cache.ManagedCache getLocalCache()- Specified by:
getLocalCache
in classcom.atlassian.cache.hazelcast.ManagedHybridCacheSupport
-
isFlushable
public boolean isFlushable()- Specified by:
isFlushable
in interfacecom.atlassian.cache.ManagedCache
-
containsKey
- Specified by:
containsKey
in interfacecom.atlassian.cache.ReadThroughCache<K,
V>
-
getKeys
- Specified by:
getKeys
in interfacecom.atlassian.cache.ReadThroughCache<K,
V>
-
get
- Specified by:
get
in interfacecom.atlassian.cache.ReadThroughCache<K,
V>
-
get
- Specified by:
get
in interfacecom.atlassian.cache.ReadThroughCache<K,
V>
-
getBulk
- Specified by:
getBulk
in interfacecom.atlassian.cache.ReadThroughCache<K,
V>
-
addListener
public void addListener(com.atlassian.cache.CacheEntryListener<K, V> listener, boolean includeValues) - Specified by:
addListener
in interfacecom.atlassian.cache.Cache<K,
V>
-
removeListener
- Specified by:
removeListener
in interfacecom.atlassian.cache.Cache<K,
V>
-