Interface StepCache<K,V>

Type Parameters:
K - Key type
V - Value type
All Superinterfaces:
AutoCloseable, Closeable

public interface StepCache<K,V> extends Closeable
A StepCache is a Map-like data structure that provides temporary storage of application data.
Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes all the entries of the StepCache.
    void
    Closes the StepCache.
    boolean
    Determines if the StepCache contains the key.
    get(K key)
    Returns the value of the key from the StepCache, or null if the StepCache contains no value for the key.
    boolean
    Determines whether this StepCache instance has been closed.
    void
    put(K key, V value)
    Stores the entry into the StepCache.
    boolean
    remove(K key)
    Deletes an entry from the StepCache by the key.
  • Method Details

    • get

      V get(K key)
      Returns the value of the key from the StepCache, or null if the StepCache contains no value for the key.
      Parameters:
      key - the key
      Returns:
      the cached value; or null if contains no value for the key
    • containsKey

      boolean containsKey(K key)
      Determines if the StepCache contains the key.
      Parameters:
      key - the key
      Returns:
      true if contains the key
    • put

      void put(K key, V value)
      Stores the entry into the StepCache.
      Parameters:
      key - the key
      value - the value to be cached
    • remove

      boolean remove(K key)
      Deletes an entry from the StepCache by the key.
      Parameters:
      key - the key
      Returns:
      returns false if don't contains the key
    • clear

      void clear()
      Removes all the entries of the StepCache.
    • close

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

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