com.atlassian.confluence.cache.hazelcast.nearcache
Class NearCacheManager
java.lang.Object
com.atlassian.confluence.cache.hazelcast.nearcache.NearCacheManager
@Internal
public class NearCacheManager
- extends java.lang.Object
Creates near cache wrapper around distributed cache.
It does so by checking if near cache explicitly configured in #nearReferenceCacheNames) and if it is then all
remote reads will be cached in locally.
Cache entry is removed when remove/expire/update event is received from distributed cache, or, if
expire-after-write/expire-after-access timeout reached on local cache.
It's possible to have different max size and exiration policies for near caches. See {@link #createNearCacheSettings}
for more details
- Since:
- 5.6
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NearCacheManager
public NearCacheManager(java.util.List<java.lang.String> nearReferenceCacheNames,
CacheSettingsManager settingsManager,
com.atlassian.cache.CacheManager localCacheManager,
ConfluenceMonitoring confluenceMonitoring,
HazelcastHelper hazelcastHelper,
AsyncEntryListenerGenerator asyncEntryListenerGenerator)
initialize
public void initialize()
- Initializes near caches for corresponding distributed caches. The reason to do that on class in this method of
lazily is because of race condition on cache creation with loader in atlassian cache api.
For every distributed cache listed in
nearReferenceCacheNames
corresponding ehcache will be created
for caching remote reads in local memory.
wrapRemoteCache
public ConfigurableManagedLockingCache wrapRemoteCache(ConfigurableManagedLockingCache remoteCache)
Copyright © 2003-2014 Atlassian. All Rights Reserved.