Package com.atlassian.confluence.cache
Class DefaultConfluenceCache<K,V>
java.lang.Object
com.atlassian.confluence.cache.DefaultConfluenceCache<K,V>
- All Implemented Interfaces:
com.atlassian.cache.Cache<K,
,V> com.atlassian.cache.ManagedCache
,com.atlassian.cache.ReadThroughCache<K,
,V> ConfluenceCache<K,
V>
- Direct Known Subclasses:
DeferredOperationsCache
Default implementation of the ConfluenceCache interface. It federates the
ManagedCache
and Cache
interfaces, for ease of implementation within confluence.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(@NonNull com.atlassian.cache.CacheEntryListener<K, V> listener, boolean required) void
clear()
boolean
containsKey
(@NonNull K key) @Nullable Long
@Nullable Long
@Nullable Integer
@Nullable V
@NonNull V
@Nullable com.atlassian.instrumentation.caches.CacheCollector
@NonNull Collection<K>
getKeys()
protected com.atlassian.cache.ManagedCache
@NonNull String
getName()
boolean
boolean
isLocal()
boolean
boolean
boolean
void
@Nullable V
putIfAbsent
(@NonNull K key, @NonNull V value) void
boolean
void
void
removeListener
(@NonNull com.atlassian.cache.CacheEntryListener<K, V> listener) boolean
void
setStatistics
(boolean b) boolean
updateExpireAfterAccess
(long expireAfter, @NonNull TimeUnit timeUnit) boolean
updateExpireAfterWrite
(long expireAfter, @NonNull TimeUnit timeUnit) boolean
updateMaxEntries
(int newValue) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.cache.ReadThroughCache
getBulk
-
Constructor Details
-
DefaultConfluenceCache
-
-
Method Details
-
containsKey
-
getKeys
-
get
-
get
-
put
-
putIfAbsent
-
remove
-
remove
-
removeAll
public void removeAll() -
replace
-
addListener
-
removeListener
-
clear
public void clear()- Specified by:
clear
in interfacecom.atlassian.cache.ManagedCache
-
getName
-
isFlushable
public boolean isFlushable()- Specified by:
isFlushable
in interfacecom.atlassian.cache.ManagedCache
-
currentMaxEntries
- Specified by:
currentMaxEntries
in interfacecom.atlassian.cache.ManagedCache
-
updateMaxEntries
public boolean updateMaxEntries(int newValue) - Specified by:
updateMaxEntries
in interfacecom.atlassian.cache.ManagedCache
-
currentExpireAfterAccessMillis
- Specified by:
currentExpireAfterAccessMillis
in interfacecom.atlassian.cache.ManagedCache
-
updateExpireAfterAccess
- Specified by:
updateExpireAfterAccess
in interfacecom.atlassian.cache.ManagedCache
-
currentExpireAfterWriteMillis
- Specified by:
currentExpireAfterWriteMillis
in interfacecom.atlassian.cache.ManagedCache
-
updateExpireAfterWrite
- Specified by:
updateExpireAfterWrite
in interfacecom.atlassian.cache.ManagedCache
-
isLocal
public boolean isLocal()- Specified by:
isLocal
in interfacecom.atlassian.cache.ManagedCache
-
isReplicateAsynchronously
public boolean isReplicateAsynchronously()- Specified by:
isReplicateAsynchronously
in interfacecom.atlassian.cache.ManagedCache
-
isReplicateViaCopy
public boolean isReplicateViaCopy()- Specified by:
isReplicateViaCopy
in interfacecom.atlassian.cache.ManagedCache
-
isStatisticsEnabled
public boolean isStatisticsEnabled()- Specified by:
isStatisticsEnabled
in interfacecom.atlassian.cache.ManagedCache
-
setStatistics
public void setStatistics(boolean b) - Specified by:
setStatistics
in interfacecom.atlassian.cache.ManagedCache
-
getStatistics
- Specified by:
getStatistics
in interfacecom.atlassian.cache.ManagedCache
-
getCacheCollector
public @Nullable com.atlassian.instrumentation.caches.CacheCollector getCacheCollector()- Specified by:
getCacheCollector
in interfacecom.atlassian.cache.ManagedCache
-
getDelegate
-
getManagedDelegate
protected com.atlassian.cache.ManagedCache getManagedDelegate()
-