Package com.atlassian.confluence.cache
Class ConfluenceManagedCache
- java.lang.Object
-
- com.atlassian.confluence.cache.ConfluenceManagedCache
-
- All Implemented Interfaces:
com.atlassian.cache.ManagedCache
public class ConfluenceManagedCache extends Object implements com.atlassian.cache.ManagedCache
Confluence-specific wrapper around a standard atlassian-cache implementation. Adds support for ensuring that certain system caches stay non-flushable.
-
-
Constructor Summary
Constructors Constructor Description ConfluenceManagedCache(com.atlassian.cache.ManagedCache delegate, boolean flushable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()LongcurrentExpireAfterAccessMillis()LongcurrentExpireAfterWriteMillis()IntegercurrentMaxEntries()@Nullable com.atlassian.instrumentation.caches.CacheCollectorgetCacheCollector()StringgetName()@NonNull SortedMap<com.atlassian.cache.CacheStatisticsKey,Supplier<Long>>getStatistics()booleanisFlushable()booleanisLocal()booleanisReplicateAsynchronously()booleanisReplicateViaCopy()booleanisStatisticsEnabled()voidsetStatistics(boolean b)booleanupdateExpireAfterAccess(long expireAfter, TimeUnit timeUnit)booleanupdateExpireAfterWrite(long expireAfter, TimeUnit timeUnit)booleanupdateMaxEntries(int newValue)
-
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfacecom.atlassian.cache.ManagedCache
-
getName
public String getName()
- Specified by:
getNamein interfacecom.atlassian.cache.ManagedCache
-
isFlushable
public boolean isFlushable()
- Specified by:
isFlushablein interfacecom.atlassian.cache.ManagedCache
-
currentMaxEntries
public Integer currentMaxEntries()
- Specified by:
currentMaxEntriesin interfacecom.atlassian.cache.ManagedCache
-
updateMaxEntries
public boolean updateMaxEntries(int newValue)
- Specified by:
updateMaxEntriesin interfacecom.atlassian.cache.ManagedCache
-
currentExpireAfterAccessMillis
public Long currentExpireAfterAccessMillis()
- Specified by:
currentExpireAfterAccessMillisin interfacecom.atlassian.cache.ManagedCache
-
updateExpireAfterAccess
public boolean updateExpireAfterAccess(long expireAfter, TimeUnit timeUnit)- Specified by:
updateExpireAfterAccessin interfacecom.atlassian.cache.ManagedCache
-
currentExpireAfterWriteMillis
public Long currentExpireAfterWriteMillis()
- Specified by:
currentExpireAfterWriteMillisin interfacecom.atlassian.cache.ManagedCache
-
updateExpireAfterWrite
public boolean updateExpireAfterWrite(long expireAfter, TimeUnit timeUnit)- 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
public @NonNull SortedMap<com.atlassian.cache.CacheStatisticsKey,Supplier<Long>> getStatistics()
- Specified by:
getStatisticsin interfacecom.atlassian.cache.ManagedCache
-
getCacheCollector
public @Nullable com.atlassian.instrumentation.caches.CacheCollector getCacheCollector()
- Specified by:
getCacheCollectorin interfacecom.atlassian.cache.ManagedCache
-
-