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
ConstructorsConstructorDescriptionGrpcBackedCachedReference(@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 TypeMethodDescriptionvoidaddListener(@NotNull com.atlassian.cache.CachedReferenceListener<V> listener, boolean includeValues) voidclear()get()booleanbooleanvoidvoidremoveListener(@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, updateMaxEntriesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
isReplicateViaCopyin interfacecom.atlassian.cache.ManagedCache- Overrides:
isReplicateViaCopyin classManagedCacheSupport
-
get
- Specified by:
getin interfacecom.atlassian.cache.CachedReference<V>
-
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
- 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
-