Package com.atlassian.cache.hazelcast
Class HazelcastHybridCachedReference<V>
java.lang.Object
com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
com.atlassian.cache.hazelcast.HazelcastHybridCachedReference<V>
- All Implemented Interfaces:
com.atlassian.cache.CachedReference<V>,com.atlassian.cache.ManagedCache
public class HazelcastHybridCachedReference<V>
extends ManagedHybridCacheSupport
implements com.atlassian.cache.CachedReference<V>
Implementation of
ManagedCache and CachedReference that can be used when the
cached value does not implement Serializable but reference invalidation must work cluster-wide.- Since:
- 2.4.0
-
Field Summary
Fields inherited from class com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
cacheManager, name -
Constructor Summary
ConstructorsConstructorDescriptionHazelcastHybridCachedReference(String name, com.atlassian.cache.CacheFactory localFactory, com.hazelcast.map.IMap<com.atlassian.cache.impl.ReferenceKey, Long> versionMap, com.atlassian.cache.Supplier<V> supplier, HazelcastCacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(com.atlassian.cache.CachedReferenceListener<V> listener, boolean includeValues) voidclear()get()protected com.atlassian.cache.ManagedCachebooleanbooleanbooleanvoidremoveListener(com.atlassian.cache.CachedReferenceListener<V> listener) voidreset()booleanupdateMaxEntries(int newValue) Methods inherited from class com.atlassian.cache.hazelcast.ManagedHybridCacheSupport
currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, getName, getStatistics, isLocal, isReplicateViaCopy, isStatisticsEnabled, setStatistics, updateExpireAfterAccess, updateExpireAfterWriteMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.cache.ManagedCache
getCacheCollector
-
Constructor Details
-
HazelcastHybridCachedReference
public HazelcastHybridCachedReference(String name, com.atlassian.cache.CacheFactory localFactory, com.hazelcast.map.IMap<com.atlassian.cache.impl.ReferenceKey, Long> versionMap, com.atlassian.cache.Supplier<V> supplier, HazelcastCacheManager cacheManager)
-
-
Method Details
-
get
- Specified by:
getin interfacecom.atlassian.cache.CachedReference<V>
-
isFlushable
public boolean isFlushable()- Specified by:
isFlushablein interfacecom.atlassian.cache.ManagedCache
-
isReplicateAsynchronously
public boolean isReplicateAsynchronously()- Specified by:
isReplicateAsynchronouslyin interfacecom.atlassian.cache.ManagedCache
-
reset
public void reset()- Specified by:
resetin interfacecom.atlassian.cache.CachedReference<V>
-
isPresent
public boolean isPresent()- Specified by:
isPresentin interfacecom.atlassian.cache.CachedReference<V>
-
getIfPresent
- Specified by:
getIfPresentin interfacecom.atlassian.cache.CachedReference<V>
-
getLocalCache
protected com.atlassian.cache.ManagedCache getLocalCache()- Specified by:
getLocalCachein classManagedHybridCacheSupport
-
clear
public void clear()- Specified by:
clearin interfacecom.atlassian.cache.ManagedCache
-
updateMaxEntries
public boolean updateMaxEntries(int newValue) - Specified by:
updateMaxEntriesin interfacecom.atlassian.cache.ManagedCache- Overrides:
updateMaxEntriesin classManagedHybridCacheSupport
-
addListener
public void addListener(@Nonnull com.atlassian.cache.CachedReferenceListener<V> listener, boolean includeValues) - Specified by:
addListenerin interfacecom.atlassian.cache.CachedReference<V>
-
removeListener
- Specified by:
removeListenerin interfacecom.atlassian.cache.CachedReference<V>
-