Interface StepCacheManager
- All Superinterfaces:
AutoCloseable,Closeable
A manager to get, create and destroy
StepCache.- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the StepCacheManager.<K,V> StepCache<K, V> createCache(StepCacheConfiguration<K, V> configuration) Creates the StepCache based on the configuration.voiddestroyCache(StepCacheConfiguration configuration) Destroys the StepCache by configuration.<K,V> StepCache<K, V> getCache(StepCacheConfiguration<K, V> configuration) Obtains the StepCache by configuration.default <K,V> StepCache<K, V> getOrCreateCache(StepCacheConfiguration<K, V> configuration) Obtains or creates StepCache if not exist.booleanisClosed()Determines whether the StepCacheManager instance has been closed.
-
Method Details
-
getCache
Obtains the StepCache by configuration.- Type Parameters:
K- key typeV- value type- Parameters:
configuration- the configuration- Returns:
- the StepCache or null if not exist
-
createCache
Creates the StepCache based on the configuration.- Type Parameters:
K- key typeV- value type- Parameters:
configuration- the configuration- Returns:
- created StepCache
-
getOrCreateCache
Obtains or creates StepCache if not exist.- Type Parameters:
K- key typeV- value type- Parameters:
configuration- the configuration- Returns:
- the StepCache
-
destroyCache
Destroys the StepCache by configuration.- Parameters:
configuration- the configuration
-
close
void close()Closes the StepCacheManager.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
isClosed
boolean isClosed()Determines whether the StepCacheManager instance has been closed.- Returns:
- true if this StepCacheManager is closed; false if it is still open
-