Class CacheFactory.NeverCacheFactory

java.lang.Object
ru.progrm_jarvis.javacommons.cache.CacheFactory.NeverCacheFactory
All Implemented Interfaces:
CacheFactory
Enclosing interface:
CacheFactory

public static final class CacheFactory.NeverCacheFactory extends Object implements CacheFactory
CacheFactory which always creates no-op caches.
  • Method Details

    • weakKeysCache

      @NotNull public <K, V> @NotNull Cache<K,V> weakKeysCache()
      Description copied from interface: CacheFactory
      Creates a new cache whose keys will be stored weakly.
      Specified by:
      weakKeysCache in interface CacheFactory
      Type Parameters:
      K - type of cache keys
      V - type of cached values
      Returns:
      weak keys cache
    • weakValuesCache

      @NotNull public <K, V> @NotNull Cache<K,V> weakValuesCache()
      Description copied from interface: CacheFactory
      Creates a new cache whose values will be stored weakly.
      Specified by:
      weakValuesCache in interface CacheFactory
      Type Parameters:
      K - type of cache keys
      V - type of cached values
      Returns:
      weak values cache
    • softValuesCache

      @NotNull public <K, V> @NotNull Cache<K,V> softValuesCache()
      Description copied from interface: CacheFactory
      Creates a new cache whose values will be stored softly.
      Specified by:
      softValuesCache in interface CacheFactory
      Type Parameters:
      K - type of cache keys
      V - type of cached values
      Returns:
      soft values cache