Class GrpcBackedCacheManager

java.lang.Object
com.atlassian.cache.impl.AbstractCacheManager
com.atlassian.bamboo.cluster.atlassiancache.GrpcBackedCacheManager
All Implemented Interfaces:
com.atlassian.cache.CacheFactory, com.atlassian.cache.CacheManager

@Internal public class GrpcBackedCacheManager extends com.atlassian.cache.impl.AbstractCacheManager
Cache manager that maintains both local and cluster-aware caches/cached references. The cluster-aware ones are communicating through the gRPC transport.
Since:
9.5
  • Field Summary

    Fields inherited from class com.atlassian.cache.impl.AbstractCacheManager

    cacheCreationLocks, caches, cacheSettingsDefaultsProvider
  • Constructor Summary

    Constructors
    Constructor
    Description
    GrpcBackedCacheManager(@NotNull com.atlassian.cache.CacheFactory localCacheFactory, @Nullable com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider, @NotNull XStreamManager xStreamManager, @Nullable CrossNodesRemoteBroadcaster crossNodesRemoteBroadcaster)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <K, V> com.atlassian.cache.ManagedCache
    createComputingCache(@NotNull String name, @NotNull com.atlassian.cache.CacheSettings settings, @Nullable com.atlassian.cache.CacheLoader<K,V> loader)
     
    protected <K, V> com.atlassian.cache.Cache<K,V>
    createDistributedCache(String name, com.atlassian.cache.CacheLoader<K,V> loader, com.atlassian.cache.CacheSettings settings)
     
    protected <V> com.atlassian.cache.CachedReference<V>
    createDistributedCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings)
     
    protected com.atlassian.cache.ManagedCache
    createSimpleCache(@NotNull String name, @NotNull com.atlassian.cache.CacheSettings settings)
     
    <V> @NotNull com.atlassian.cache.CachedReference<V>
    getCachedReference(@NotNull String name, @NotNull com.atlassian.cache.Supplier<V> supplier, @NotNull com.atlassian.cache.CacheSettings settings)
     
    @Nullable com.atlassian.cache.CacheSettings
    getCacheSettings(@NotNull String name)
     

    Methods inherited from class com.atlassian.cache.impl.AbstractCacheManager

    flushCaches, getCache, getCache, getCache, getCache, getCache, getCachedReference, getCachedReference, getCachedReference, getCaches, getManagedCache, getManagedCaches, mergeSettings, shutdown

    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.CacheFactory

    getReadThroughCache, getReadThroughCache
  • Constructor Details

    • GrpcBackedCacheManager

      public GrpcBackedCacheManager(@NotNull @NotNull com.atlassian.cache.CacheFactory localCacheFactory, @Nullable @Nullable com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider, @NotNull @NotNull XStreamManager xStreamManager, @Nullable @Nullable CrossNodesRemoteBroadcaster crossNodesRemoteBroadcaster)
  • Method Details

    • createComputingCache

      protected <K, V> com.atlassian.cache.ManagedCache createComputingCache(@NotNull @NotNull String name, @NotNull @NotNull com.atlassian.cache.CacheSettings settings, @Nullable @Nullable com.atlassian.cache.CacheLoader<K,V> loader)
      Specified by:
      createComputingCache in class com.atlassian.cache.impl.AbstractCacheManager
    • createSimpleCache

      protected com.atlassian.cache.ManagedCache createSimpleCache(@NotNull @NotNull String name, @NotNull @NotNull com.atlassian.cache.CacheSettings settings)
      Specified by:
      createSimpleCache in class com.atlassian.cache.impl.AbstractCacheManager
    • getCachedReference

      @NotNull public <V> @NotNull com.atlassian.cache.CachedReference<V> getCachedReference(@NotNull @NotNull String name, @NotNull @NotNull com.atlassian.cache.Supplier<V> supplier, @NotNull @NotNull com.atlassian.cache.CacheSettings settings)
    • createDistributedCache

      protected <K, V> com.atlassian.cache.Cache<K,V> createDistributedCache(String name, com.atlassian.cache.CacheLoader<K,V> loader, com.atlassian.cache.CacheSettings settings)
    • createDistributedCachedReference

      protected <V> com.atlassian.cache.CachedReference<V> createDistributedCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings)
    • getCacheSettings

      @Nullable public @Nullable com.atlassian.cache.CacheSettings getCacheSettings(@NotNull @NotNull String name)