Interface IResourceStoreManager.IResourceStoreWithLoader<Key,Value>
- Type Parameters:
Key- The type of the key.Value- The type of the associated value.
- All Superinterfaces:
IResourceStoreManager.IResourceStoreBase<Key,Value>
- Enclosing interface:
IResourceStoreManager
public static interface IResourceStoreManager.IResourceStoreWithLoader<Key,Value>
extends IResourceStoreManager.IResourceStoreBase<Key,Value>
Same as
IResourceStoreManager.IResourceStore, but with a bound loader that does not need to be specified each time when
requesting a value for a key.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Methods inherited from interface IResourceStoreManager.IResourceStoreBase
computeIfAbsent, getIfPresent, remove, removeAndGetIfPresent
-
Method Details
-
computeIfAbsent
Gets the value for the given key. When the value exists already, it will be returned. If the value does not exist yet, it will be loaded using the bound loader.- Parameters:
key- The key for which to get the value.- Returns:
- The associated value, either from the store if still fresh, or obtained from the bound loader.
- Throws:
IOException- If the loader throws an exception.
-