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-aware
CachedReference
backed 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
ConstructorDescriptionGrpcBackedCachedReference
(@NotNull String name, @NotNull com.atlassian.cache.Supplier<V> supplier, @NotNull GrpcBackedCacheManager cacheManager, @Nullable CrossNodesRemoteBroadcaster crossNodesRemoteBroadcaster, @NotNull com.atlassian.cache.CacheFactory localFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(@NotNull com.atlassian.cache.CachedReferenceListener<V> listener, boolean includeValues) void
clear()
get()
boolean
boolean
void
void
removeListener
(@NotNull com.atlassian.cache.CachedReferenceListener<V> listener) void
reset()
Methods inherited from class com.atlassian.bamboo.cluster.atlassiancache.ManagedCacheSupport
currentExpireAfterAccessMillis, currentExpireAfterWriteMillis, currentMaxEntries, getCacheSettings, getName, getStatistics, isFlushable, isLocal, isReplicateAsynchronously, isStatisticsEnabled, setStatistics, updateExpireAfterAccess, updateExpireAfterWrite, updateMaxEntries
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
getCacheCollector
-
Constructor Details
-
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 Details
-
isReplicateViaCopy
public boolean isReplicateViaCopy()- Specified by:
isReplicateViaCopy
in interfacecom.atlassian.cache.ManagedCache
- Overrides:
isReplicateViaCopy
in classManagedCacheSupport
-
get
- Specified by:
get
in interfacecom.atlassian.cache.CachedReference<V>
-
reset
public void reset()- Specified by:
reset
in interfacecom.atlassian.cache.CachedReference<V>
-
processRemoteReset
public void processRemoteReset()- Specified by:
processRemoteReset
in interfaceCachedReferenceRemoteAccessor
-
isPresent
public boolean isPresent()- Specified by:
isPresent
in interfacecom.atlassian.cache.CachedReference<V>
-
getIfPresent
- Specified by:
getIfPresent
in interfacecom.atlassian.cache.CachedReference<V>
-
addListener
public void addListener(@NotNull @NotNull com.atlassian.cache.CachedReferenceListener<V> listener, boolean includeValues) - Specified by:
addListener
in interfacecom.atlassian.cache.CachedReference<V>
-
removeListener
public void removeListener(@NotNull @NotNull com.atlassian.cache.CachedReferenceListener<V> listener) - Specified by:
removeListener
in interfacecom.atlassian.cache.CachedReference<V>
-
clear
public void clear()- Specified by:
clear
in interfacecom.atlassian.cache.ManagedCache
-