Interface StepCache<K,V>
- Type Parameters:
K
- Key typeV
- Value type
- All Superinterfaces:
AutoCloseable
,Closeable
A StepCache is a Map-like data structure that provides temporary storage of application data.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all the entries of the StepCache.void
close()
Closes the StepCache.boolean
containsKey
(K key) Determines if the StepCache contains the key.Returns the value of the key from the StepCache, or null if the StepCache contains no value for the key.boolean
isClosed()
Determines whether this StepCache instance has been closed.void
Stores the entry into the StepCache.boolean
Deletes an entry from the StepCache by the key.
-
Method Details
-
get
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
Determines if the StepCache contains the key.- Parameters:
key
- the key- Returns:
- true if contains the key
-
put
Stores the entry into the StepCache.- Parameters:
key
- the keyvalue
- the value to be cached
-
remove
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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
isClosed
boolean isClosed()Determines whether this StepCache instance has been closed.- Returns:
- true if this StepCache is closed; false if it is still open
-