Class GrpcBackedCachedReference<V>
- java.lang.Object
-
- com.atlassian.bamboo.cluster.atlassiancache.ManagedCacheSupport
-
- com.atlassian.bamboo.cluster.atlassiancache.GrpcBackedCachedReference<V>
-
- Type Parameters:
V- value type
- All Implemented Interfaces:
CachedReferenceRemoteAccessor,com.atlassian.cache.CachedReference<V>,com.atlassian.cache.ManagedCache
public class GrpcBackedCachedReference<V> extends ManagedCacheSupport implements com.atlassian.cache.CachedReference<V>, CachedReferenceRemoteAccessor
A cluster-awareCachedReferencebacked by a gRPC transport. There is no support for modifying the cached reference settings after the cache has been created.- Since:
- 9.5
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.cluster.atlassiancache.ManagedCacheSupport
cacheManager, name
-
-
Constructor Summary
Constructors Constructor Description GrpcBackedCachedReference(@NotNull String name, @NotNull com.atlassian.cache.Supplier<V> supplier, @NotNull GrpcBackedCacheManager cacheManager, @Nullable CrossNodesRemoteBroadcaster crossNodesRemoteBroadcaster, @NotNull com.atlassian.cache.CacheFactory localFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(@NotNull com.atlassian.cache.CachedReferenceListener<V> listener, boolean includeValues)voidclear()Vget()@NotNull Optional<V>getIfPresent()booleanisPresent()booleanisReplicateViaCopy()voidprocessRemoteReset()voidremoveListener(@NotNull com.atlassian.cache.CachedReferenceListener<V> listener)voidreset()-
Methods inherited from class com.atlassian.bamboo.cluster.atlassiancache.ManagedCacheSupport
currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, getCacheSettings, getName, getStatistics, isFlushable, isLocal, isReplicateAsynchronously, isStatisticsEnabled, setStatistics, updateExpireAfterAccess, updateExpireAfterWrite, updateMaxEntries
-
-
-
-
Constructor Detail
-
GrpcBackedCachedReference
public GrpcBackedCachedReference(@NotNull @NotNull String name, @NotNull @NotNull com.atlassian.cache.Supplier<V> supplier, @NotNull @NotNull GrpcBackedCacheManager cacheManager, @Nullable @Nullable CrossNodesRemoteBroadcaster crossNodesRemoteBroadcaster, @NotNull @NotNull com.atlassian.cache.CacheFactory localFactory)
-
-
Method Detail
-
isReplicateViaCopy
public boolean isReplicateViaCopy()
- Specified by:
isReplicateViaCopyin interfacecom.atlassian.cache.ManagedCache- Overrides:
isReplicateViaCopyin classManagedCacheSupport
-
reset
public void reset()
- Specified by:
resetin interfacecom.atlassian.cache.CachedReference<V>
-
processRemoteReset
public void processRemoteReset()
- Specified by:
processRemoteResetin interfaceCachedReferenceRemoteAccessor
-
isPresent
public boolean isPresent()
- Specified by:
isPresentin interfacecom.atlassian.cache.CachedReference<V>
-
getIfPresent
@NotNull public @NotNull Optional<V> getIfPresent()
- Specified by:
getIfPresentin interfacecom.atlassian.cache.CachedReference<V>
-
addListener
public void addListener(@NotNull @NotNull com.atlassian.cache.CachedReferenceListener<V> listener, boolean includeValues)- Specified by:
addListenerin interfacecom.atlassian.cache.CachedReference<V>
-
removeListener
public void removeListener(@NotNull @NotNull com.atlassian.cache.CachedReferenceListener<V> listener)- Specified by:
removeListenerin interfacecom.atlassian.cache.CachedReference<V>
-
clear
public void clear()
- Specified by:
clearin interfacecom.atlassian.cache.ManagedCache
-
-