Class DelegatingCacheManager

  • All Implemented Interfaces:
    com.atlassian.cache.CacheFactory, com.atlassian.cache.CacheManager
    Direct Known Subclasses:
    ConfluenceHazelcastCacheManager

    public abstract class DelegatingCacheManager
    extends Object
    implements com.atlassian.cache.CacheManager
    A CacheManager implementation that delegates all method calls to another CacheManager.
    Since:
    8.3
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void flushCaches()  
      <K,​V>
      @NonNull com.atlassian.cache.Cache<K,​V>
      getCache​(@NonNull Class<?> owningClass, @NonNull String name)  
      <K,​V>
      @NonNull com.atlassian.cache.Cache<K,​V>
      getCache​(@NonNull String name)  
      <K,​V>
      @NonNull com.atlassian.cache.Cache<K,​V>
      getCache​(@NonNull String name, @NonNull Class<K> keyType, @NonNull Class<V> valueType)  
      <K,​V>
      @NonNull com.atlassian.cache.Cache<K,​V>
      getCache​(@NonNull String name, @Nullable com.atlassian.cache.CacheLoader<K,​V> loader)  
      <K,​V>
      @NonNull com.atlassian.cache.Cache<K,​V>
      getCache​(@NonNull String name, @Nullable com.atlassian.cache.CacheLoader<K,​V> loader, @NonNull com.atlassian.cache.CacheSettings required)  
      <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference​(@NonNull Class<?> owningClass, @NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier)  
      <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference​(@NonNull Class<?> owningClass, @NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier, @NonNull com.atlassian.cache.CacheSettings required)  
      <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference​(@NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier)  
      <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference​(@NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier, @NonNull com.atlassian.cache.CacheSettings required)  
      @NonNull Collection<com.atlassian.cache.Cache<?,​?>> getCaches()  
      protected abstract com.atlassian.cache.CacheManager getDelegate()  
      @Nullable com.atlassian.cache.ManagedCache getManagedCache​(@NonNull String name)  
      @NonNull Collection<com.atlassian.cache.ManagedCache> getManagedCaches()  
      void shutdown()  
    • Constructor Detail

      • DelegatingCacheManager

        public DelegatingCacheManager()
    • Method Detail

      • getDelegate

        protected abstract com.atlassian.cache.CacheManager getDelegate()
      • getCaches

        public @NonNull Collection<com.atlassian.cache.Cache<?,​?>> getCaches()
        Specified by:
        getCaches in interface com.atlassian.cache.CacheManager
      • getManagedCaches

        public @NonNull Collection<com.atlassian.cache.ManagedCache> getManagedCaches()
        Specified by:
        getManagedCaches in interface com.atlassian.cache.CacheManager
      • flushCaches

        public void flushCaches()
        Specified by:
        flushCaches in interface com.atlassian.cache.CacheManager
      • getManagedCache

        public @Nullable com.atlassian.cache.ManagedCache getManagedCache​(@NonNull String name)
        Specified by:
        getManagedCache in interface com.atlassian.cache.CacheManager
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface com.atlassian.cache.CacheManager
      • getCachedReference

        public <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference​(@NonNull String name,
                                                                                      @NonNull com.atlassian.cache.Supplier<V> supplier)
        Specified by:
        getCachedReference in interface com.atlassian.cache.CacheFactory
      • getCachedReference

        public <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference​(@NonNull String name,
                                                                                      @NonNull com.atlassian.cache.Supplier<V> supplier,
                                                                                      @NonNull com.atlassian.cache.CacheSettings required)
        Specified by:
        getCachedReference in interface com.atlassian.cache.CacheFactory
      • getCachedReference

        public <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference​(@NonNull Class<?> owningClass,
                                                                                      @NonNull String name,
                                                                                      @NonNull com.atlassian.cache.Supplier<V> supplier)
        Specified by:
        getCachedReference in interface com.atlassian.cache.CacheFactory
      • getCachedReference

        public <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference​(@NonNull Class<?> owningClass,
                                                                                      @NonNull String name,
                                                                                      @NonNull com.atlassian.cache.Supplier<V> supplier,
                                                                                      @NonNull com.atlassian.cache.CacheSettings required)
        Specified by:
        getCachedReference in interface com.atlassian.cache.CacheFactory
      • getCache

        public <K,​V> @NonNull com.atlassian.cache.Cache<K,​V> getCache​(@NonNull String name)
        Specified by:
        getCache in interface com.atlassian.cache.CacheFactory
      • getCache

        public <K,​V> @NonNull com.atlassian.cache.Cache<K,​V> getCache​(@NonNull Class<?> owningClass,
                                                                                  @NonNull String name)
        Specified by:
        getCache in interface com.atlassian.cache.CacheFactory
      • getCache

        public <K,​V> @NonNull com.atlassian.cache.Cache<K,​V> getCache​(@NonNull String name,
                                                                                  @Nullable com.atlassian.cache.CacheLoader<K,​V> loader)
        Specified by:
        getCache in interface com.atlassian.cache.CacheFactory
      • getCache

        public <K,​V> @NonNull com.atlassian.cache.Cache<K,​V> getCache​(@NonNull String name,
                                                                                  @Nullable com.atlassian.cache.CacheLoader<K,​V> loader,
                                                                                  @NonNull com.atlassian.cache.CacheSettings required)
        Specified by:
        getCache in interface com.atlassian.cache.CacheFactory
      • getCache

        public <K,​V> @NonNull com.atlassian.cache.Cache<K,​V> getCache​(@NonNull String name,
                                                                                  @NonNull Class<K> keyType,
                                                                                  @NonNull Class<V> valueType)
        Specified by:
        getCache in interface com.atlassian.cache.CacheFactory