Package com.atlassian.cache.hazelcast
Class HazelcastCache<K,V>
java.lang.Object
com.atlassian.cache.hazelcast.ManagedCacheSupport
com.atlassian.cache.hazelcast.HazelcastCache<K,V>
- All Implemented Interfaces:
com.atlassian.cache.Cache<K,,V> com.atlassian.cache.ManagedCache,com.atlassian.cache.ReadThroughCache<K,V>
public class HazelcastCache<K,V>
extends ManagedCacheSupport
implements com.atlassian.cache.Cache<K,V>
Hazelcast implementation of the
Cache and ManagedCache interfaces- Since:
- 2.4.0
-
Field Summary
Fields inherited from class com.atlassian.cache.hazelcast.ManagedCacheSupport
cacheManager -
Constructor Summary
ConstructorsConstructorDescriptionHazelcastCache(String name, com.hazelcast.map.IMap<K, com.atlassian.hazelcast.serialization.OsgiSafe<V>> map, com.atlassian.cache.CacheLoader<K, V> cacheLoader, com.atlassian.cache.hazelcast.CacheVersion cacheVersion, HazelcastCacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(com.atlassian.cache.CacheEntryListener<K, V> listener, boolean includeValues) voidclear()booleancontainsKey(K k) Overrides the default implementation inCache, optimised to use the bulkIMap.getAll(Set)andIMap.putAll(Map)methods.protected StringgetKeys()booleanvoidputIfAbsent(K key, V value) voidbooleanvoidvoidremoveListener(com.atlassian.cache.CacheEntryListener<K, V> listener) booleanMethods inherited from class com.atlassian.cache.hazelcast.ManagedCacheSupport
currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, getName, isFlushable, isLocal, isReplicateAsynchronously, isReplicateViaCopy, 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
-
HazelcastCache
-
-
Method Details
-
clear
public void clear()- Specified by:
clearin interfacecom.atlassian.cache.ManagedCache
-
containsKey
-
get
-
get
-
getBulk
@Nonnull public Map<K,V> getBulk(@Nonnull Set<K> keys, @Nonnull Function<Set<K>, Map<K, V>> valuesSupplier) Overrides the default implementation inCache, optimised to use the bulkIMap.getAll(Set)andIMap.putAll(Map)methods. -
getKeys
-
put
-
putIfAbsent
-
remove
-
remove
-
removeAll
public void removeAll() -
replace
-
addListener
-
removeListener
-
getHazelcastMapName
- Specified by:
getHazelcastMapNamein classManagedCacheSupport
-
getStatistics
- Specified by:
getStatisticsin interfacecom.atlassian.cache.ManagedCache- Overrides:
getStatisticsin classManagedCacheSupport
-
isStatisticsEnabled
public boolean isStatisticsEnabled()- Specified by:
isStatisticsEnabledin interfacecom.atlassian.cache.ManagedCache- Overrides:
isStatisticsEnabledin classManagedCacheSupport
-