Class ManagedCacheSupport
java.lang.Object
com.atlassian.bamboo.cluster.atlassiancache.ManagedCacheSupport
- All Implemented Interfaces:
com.atlassian.cache.ManagedCache
- Direct Known Subclasses:
GrpcBackedCache
,GrpcBackedCachedReference
public abstract class ManagedCacheSupport
extends Object
implements com.atlassian.cache.ManagedCache
Common implementation of
ManagedCache
for gRPC backed caches.- Since:
- 9.5
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ManagedCacheSupport
(String name, GrpcBackedCacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescription@Nullable Long
@Nullable Long
@Nullable Integer
protected @NotNull Optional<com.atlassian.cache.CacheSettings>
@NotNull String
getName()
boolean
boolean
isLocal()
boolean
boolean
boolean
void
setStatistics
(boolean enabled) boolean
updateExpireAfterAccess
(long expireAfter, @NotNull TimeUnit timeUnit) boolean
updateExpireAfterWrite
(long expireAfter, @NotNull 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.ManagedCache
clear, getCacheCollector
-
Field Details
-
name
-
cacheManager
-
-
Constructor Details
-
ManagedCacheSupport
-
-
Method Details
-
currentExpireAfterAccessMillis
- Specified by:
currentExpireAfterAccessMillis
in interfacecom.atlassian.cache.ManagedCache
-
currentExpireAfterWriteMillis
- Specified by:
currentExpireAfterWriteMillis
in interfacecom.atlassian.cache.ManagedCache
-
currentMaxEntries
- Specified by:
currentMaxEntries
in interfacecom.atlassian.cache.ManagedCache
-
isReplicateViaCopy
public boolean isReplicateViaCopy()- Specified by:
isReplicateViaCopy
in interfacecom.atlassian.cache.ManagedCache
-
getName
- Specified by:
getName
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
-
updateExpireAfterAccess
- Specified by:
updateExpireAfterAccess
in interfacecom.atlassian.cache.ManagedCache
-
updateExpireAfterWrite
- Specified by:
updateExpireAfterWrite
in interfacecom.atlassian.cache.ManagedCache
-
updateMaxEntries
public boolean updateMaxEntries(int newValue) - Specified by:
updateMaxEntries
in interfacecom.atlassian.cache.ManagedCache
-
getStatistics
@NotNull public @NotNull SortedMap<com.atlassian.cache.CacheStatisticsKey,Supplier<Long>> getStatistics()- Specified by:
getStatistics
in interfacecom.atlassian.cache.ManagedCache
-
isStatisticsEnabled
public boolean isStatisticsEnabled()- Specified by:
isStatisticsEnabled
in interfacecom.atlassian.cache.ManagedCache
-
setStatistics
public void setStatistics(boolean enabled) - Specified by:
setStatistics
in interfacecom.atlassian.cache.ManagedCache
-
isFlushable
public boolean isFlushable()- Specified by:
isFlushable
in interfacecom.atlassian.cache.ManagedCache
-
getCacheSettings
-