Interface CacheManager<T>

Type Parameters:
T - type of value

@Deprecated public interface CacheManager<T>
Deprecated.
use a local cache instead
CacheManager interface
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    clear plugins cache
    boolean
    Deprecated.
    Clear plugins cache.
    get(String key)
    Deprecated.
    Returns a populated #Optional if the value exists, otherwise Optional.empty().
    get(String key, BiFunction<String,T,T> loader)
    Deprecated.
    Get or load a value by supplying a key, value, and function.
    get(String key, Function<String,T> loader)
    Deprecated.
    Get or load a value by supplying a key and function.
    void
    init(String pluginType)
    Deprecated.
    Initialize cache for pluginType
    Deprecated.
    Invalidates, or removes the associated cache entry.
    put(String key, T value)
    Deprecated.
    Populate a cache with value.
  • Method Details

    • init

      void init(String pluginType)
      Deprecated.
      Initialize cache for pluginType
      Parameters:
      pluginType - pluginType
    • get

      Optional<T> get(String key)
      Deprecated.
      Returns a populated #Optional if the value exists, otherwise Optional.empty().
      Parameters:
      key - key
      Returns:
      The return value.
    • put

      Optional<T> put(String key, T value)
      Deprecated.
      Populate a cache with value.
      Parameters:
      key - key
      value - value
      Returns:
      The return value is previous value.
    • get

      T get(String key, Function<String,T> loader)
      Deprecated.
      Get or load a value by supplying a key and function. The function is provided an #Optional, representing the existing value, if any.
      Parameters:
      key - key
      loader - loader
      Returns:
      existing or new value
    • get

      T get(String key, BiFunction<String,T,T> loader)
      Deprecated.
      Get or load a value by supplying a key, value, and function. The bi function can access existing value and produce new value from it.
      Parameters:
      key - key
      loader - bi function loader
      Returns:
      null if key is not present, otherwise return new value
    • invalidate

      Optional<T> invalidate(String key)
      Deprecated.
      Invalidates, or removes the associated cache entry.
      Parameters:
      key - key
      Returns:
      Returns a populated #Optional if the entry existed, otherwise Optional.empty().
    • contains

      boolean contains(String key)
      Deprecated.
      Clear plugins cache.
      Parameters:
      key - key
      Returns:
      boolean value indicating whether cache contains key or not
    • clear

      void clear()
      Deprecated.
      clear plugins cache