@Internal public class ConfluenceMonitoringCache<K,V> extends Object implements ConfluenceCache<K,V>
ConfluenceMonitoring
instance.Constructor and Description |
---|
ConfluenceMonitoringCache(ConfluenceCache<K,V> cache,
ConfluenceMonitoring confluenceMonitoring)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(@NonNull com.atlassian.cache.CacheEntryListener<K,V> kvCacheEntryListener,
boolean b) |
void |
clear() |
boolean |
containsKey(K k) |
protected Split |
createLockSplit() |
protected Split |
createReadSplit() |
protected Split |
createSplit(String operation) |
protected Split |
createUnlockSplit() |
protected Split |
createWriteSplit() |
@Nullable Long |
currentExpireAfterAccessMillis() |
@Nullable Long |
currentExpireAfterWriteMillis() |
@Nullable Integer |
currentMaxEntries() |
V |
get(K key) |
V |
get(K k,
com.atlassian.cache.Supplier<? extends V> supplier) |
@Nullable com.atlassian.instrumentation.caches.CacheCollector |
getCacheCollector() |
@NonNull Collection<K> |
getKeys() |
@NonNull String |
getName() |
@NonNull SortedMap<com.atlassian.cache.CacheStatisticsKey,Supplier<Long>> |
getStatistics() |
boolean |
isFlushable() |
boolean |
isLocal() |
boolean |
isReplicateAsynchronously() |
boolean |
isReplicateViaCopy() |
boolean |
isStatisticsEnabled() |
void |
put(K key,
V value) |
V |
putIfAbsent(K key,
V value) |
void |
remove(K key) |
boolean |
remove(K key,
V value) |
void |
removeAll() |
void |
removeListener(@NonNull com.atlassian.cache.CacheEntryListener<K,V> kvCacheEntryListener) |
boolean |
replace(K key,
V oldValue,
V newValue) |
void |
setStatistics(boolean b) |
void |
setTimeToLive(long timeToLive,
TimeUnit timeUnit)
Update the time to live.
|
boolean |
updateExpireAfterAccess(long expireAfter,
@NonNull TimeUnit timeUnit) |
boolean |
updateExpireAfterWrite(long expireAfter,
@NonNull TimeUnit timeUnit) |
boolean |
updateMaxEntries(int newValue) |
public ConfluenceMonitoringCache(ConfluenceCache<K,V> cache, ConfluenceMonitoring confluenceMonitoring)
cache
- the (Cache
) interface to the cache to be monitoredconfluenceMonitoring
- the ConfluenceMonitoring
instance to use for monitoringpublic boolean containsKey(K k)
public @NonNull Collection<K> getKeys()
public void removeAll()
public void addListener(@NonNull com.atlassian.cache.CacheEntryListener<K,V> kvCacheEntryListener, boolean b)
public void removeListener(@NonNull com.atlassian.cache.CacheEntryListener<K,V> kvCacheEntryListener)
public void clear()
clear
in interface com.atlassian.cache.ManagedCache
public @NonNull String getName()
public boolean isFlushable()
isFlushable
in interface com.atlassian.cache.ManagedCache
public @Nullable Integer currentMaxEntries()
currentMaxEntries
in interface com.atlassian.cache.ManagedCache
public boolean updateMaxEntries(int newValue)
updateMaxEntries
in interface com.atlassian.cache.ManagedCache
public @Nullable Long currentExpireAfterAccessMillis()
currentExpireAfterAccessMillis
in interface com.atlassian.cache.ManagedCache
public boolean updateExpireAfterAccess(long expireAfter, @NonNull TimeUnit timeUnit)
updateExpireAfterAccess
in interface com.atlassian.cache.ManagedCache
public @Nullable Long currentExpireAfterWriteMillis()
currentExpireAfterWriteMillis
in interface com.atlassian.cache.ManagedCache
public boolean updateExpireAfterWrite(long expireAfter, @NonNull TimeUnit timeUnit)
updateExpireAfterWrite
in interface com.atlassian.cache.ManagedCache
public boolean isLocal()
isLocal
in interface com.atlassian.cache.ManagedCache
public boolean isReplicateAsynchronously()
isReplicateAsynchronously
in interface com.atlassian.cache.ManagedCache
public boolean isReplicateViaCopy()
isReplicateViaCopy
in interface com.atlassian.cache.ManagedCache
public boolean isStatisticsEnabled()
isStatisticsEnabled
in interface com.atlassian.cache.ManagedCache
public void setStatistics(boolean b)
setStatistics
in interface com.atlassian.cache.ManagedCache
public @NonNull SortedMap<com.atlassian.cache.CacheStatisticsKey,Supplier<Long>> getStatistics()
getStatistics
in interface com.atlassian.cache.ManagedCache
public @Nullable com.atlassian.instrumentation.caches.CacheCollector getCacheCollector()
getCacheCollector
in interface com.atlassian.cache.ManagedCache
public void setTimeToLive(long timeToLive, TimeUnit timeUnit)
ConfigurableCache
TimeUnit.SECONDS
.setTimeToLive
in interface ConfigurableCache<K,V>
timeToLive
- valuetimeUnit
- unit of timeprotected Split createReadSplit()
protected Split createWriteSplit()
protected Split createLockSplit()
protected Split createUnlockSplit()
Copyright © 2003–2020 Atlassian. All rights reserved.