Interface StepCacheManager

All Superinterfaces:
AutoCloseable, Closeable

public interface StepCacheManager extends Closeable
A manager to get, create and destroy StepCache.
Since:
2.0.0
  • Method Details

    • getCache

      <K, V> StepCache<K,V> getCache(StepCacheConfiguration<K,V> configuration)
      Obtains the StepCache by configuration.
      Type Parameters:
      K - key type
      V - value type
      Parameters:
      configuration - the configuration
      Returns:
      the StepCache or null if not exist
    • createCache

      <K, V> StepCache<K,V> createCache(StepCacheConfiguration<K,V> configuration)
      Creates the StepCache based on the configuration.
      Type Parameters:
      K - key type
      V - value type
      Parameters:
      configuration - the configuration
      Returns:
      created StepCache
    • getOrCreateCache

      default <K, V> StepCache<K,V> getOrCreateCache(StepCacheConfiguration<K,V> configuration)
      Obtains or creates StepCache if not exist.
      Type Parameters:
      K - key type
      V - value type
      Parameters:
      configuration - the configuration
      Returns:
      the StepCache
    • destroyCache

      void destroyCache(StepCacheConfiguration configuration)
      Destroys the StepCache by configuration.
      Parameters:
      configuration - the configuration
    • close

      void close()
      Closes the StepCacheManager.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • isClosed

      boolean isClosed()
      Determines whether the StepCacheManager instance has been closed.
      Returns:
      true if this StepCacheManager is closed; false if it is still open