Interface CacheFactory

All Known Implementing Classes:
CacheFactory.NeverCacheFactory

public interface CacheFactory
Factory used for creation of generic caches.
  • Method Details

    • weakKeysCache

      @NotNull <K, V> @NotNull Cache<K,V> weakKeysCache()
      Creates a new cache whose keys will be stored weakly.
      Type Parameters:
      K - type of cache keys
      V - type of cached values
      Returns:
      weak keys cache
    • weakValuesCache

      @NotNull <K, V> @NotNull Cache<K,V> weakValuesCache()
      Creates a new cache whose values will be stored weakly.
      Type Parameters:
      K - type of cache keys
      V - type of cached values
      Returns:
      weak values cache
    • softValuesCache

      @NotNull <K, V> @NotNull Cache<K,V> softValuesCache()
      Creates a new cache whose values will be stored softly.
      Type Parameters:
      K - type of cache keys
      V - type of cached values
      Returns:
      soft values cache
    • never

      @NotNull static @NotNull CacheFactory never()
      Creates a cache factory which always creates no-op caches.
      Returns:
      cache factory which always supplies no-op caches