Package com.atlassian.confluence.cache
Class ConfluenceMonitoringCache<K,V> 
java.lang.Object
com.atlassian.confluence.cache.ConfluenceMonitoringCache<K,V> 
- All Implemented Interfaces:
 com.atlassian.cache.Cache<K,,V> com.atlassian.cache.ManagedCache,com.atlassian.cache.ReadThroughCache<K,,V> ConfluenceCache<K,V> 
@Internal
public class ConfluenceMonitoringCache<K,V> 
extends Object
implements ConfluenceCache<K,V> 
A wrapper for monitoring the performance of Confluence caches. The performance is monitored using the supplied
 
ConfluenceMonitoring instance.- Since:
 - 5.6
 
- 
Constructor Summary
ConstructorsConstructorDescriptionConfluenceMonitoringCache(ConfluenceCache<K, V> cache, ConfluenceMonitoring confluenceMonitoring) Constructs a new instance. - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(@NonNull com.atlassian.cache.CacheEntryListener<K, V> kvCacheEntryListener, boolean b) voidclear()booleancontainsKey(@NonNull K k) protected Splitprotected Splitprotected SplitcreateSplit(String operation) protected Splitprotected Split@Nullable Long@Nullable Long@Nullable Integer@NonNull V@Nullable com.atlassian.instrumentation.caches.CacheCollector@NonNull Collection<K>getKeys()@NonNull StringgetName()booleanbooleanisLocal()booleanbooleanbooleanvoidputIfAbsent(@NonNull K key, @NonNull V value) voidbooleanvoidvoidremoveListener(@NonNull com.atlassian.cache.CacheEntryListener<K, V> kvCacheEntryListener) booleanvoidsetStatistics(boolean b) booleanupdateExpireAfterAccess(long expireAfter, @NonNull TimeUnit timeUnit) booleanupdateExpireAfterWrite(long expireAfter, @NonNull TimeUnit timeUnit) booleanupdateMaxEntries(int newValue) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.cache.ReadThroughCache
getBulk 
- 
Constructor Details
- 
ConfluenceMonitoringCache
public ConfluenceMonitoringCache(ConfluenceCache<K, V> cache, ConfluenceMonitoring confluenceMonitoring) Constructs a new instance.- Parameters:
 cache- the (Cache) interface to the cache to be monitoredconfluenceMonitoring- theConfluenceMonitoringinstance to use for monitoring
 
 - 
 - 
Method Details
- 
get
 - 
get
 - 
containsKey
 - 
getKeys
 - 
put
 - 
remove
 - 
removeAll
public void removeAll() - 
putIfAbsent
 - 
replace
 - 
addListener
 - 
removeListener
 - 
remove
 - 
clear
public void clear()- Specified by:
 clearin interfacecom.atlassian.cache.ManagedCache
 - 
getName
 - 
isFlushable
public boolean isFlushable()- Specified by:
 isFlushablein interfacecom.atlassian.cache.ManagedCache
 - 
currentMaxEntries
- Specified by:
 currentMaxEntriesin interfacecom.atlassian.cache.ManagedCache
 - 
updateMaxEntries
public boolean updateMaxEntries(int newValue) - Specified by:
 updateMaxEntriesin interfacecom.atlassian.cache.ManagedCache
 - 
currentExpireAfterAccessMillis
- Specified by:
 currentExpireAfterAccessMillisin interfacecom.atlassian.cache.ManagedCache
 - 
updateExpireAfterAccess
- Specified by:
 updateExpireAfterAccessin interfacecom.atlassian.cache.ManagedCache
 - 
currentExpireAfterWriteMillis
- Specified by:
 currentExpireAfterWriteMillisin interfacecom.atlassian.cache.ManagedCache
 - 
updateExpireAfterWrite
- Specified by:
 updateExpireAfterWritein interfacecom.atlassian.cache.ManagedCache
 - 
isLocal
public boolean isLocal()- Specified by:
 isLocalin interfacecom.atlassian.cache.ManagedCache
 - 
isReplicateAsynchronously
public boolean isReplicateAsynchronously()- Specified by:
 isReplicateAsynchronouslyin interfacecom.atlassian.cache.ManagedCache
 - 
isReplicateViaCopy
public boolean isReplicateViaCopy()- Specified by:
 isReplicateViaCopyin interfacecom.atlassian.cache.ManagedCache
 - 
isStatisticsEnabled
public boolean isStatisticsEnabled()- Specified by:
 isStatisticsEnabledin interfacecom.atlassian.cache.ManagedCache
 - 
setStatistics
public void setStatistics(boolean b) - Specified by:
 setStatisticsin interfacecom.atlassian.cache.ManagedCache
 - 
getStatistics
- Specified by:
 getStatisticsin interfacecom.atlassian.cache.ManagedCache
 - 
getCacheCollector
public @Nullable com.atlassian.instrumentation.caches.CacheCollector getCacheCollector()- Specified by:
 getCacheCollectorin interfacecom.atlassian.cache.ManagedCache
 - 
createSplit
 - 
createReadSplit
 - 
createWriteSplit
 - 
createLockSplit
 - 
createUnlockSplit
 
 -