Interface IResourceStoreManager.IVersionedResourceStoreWithLoaderAndVersionExtractor<Key,Value>
-
- Type Parameters:
Key
- The type of the key.Value
- The type of the derived value.
- All Superinterfaces:
IResourceStoreManager.IVersionedResourceStoreBase<Key,Value>
,IResourceStoreManager.IVersionedResourceStoreWithLoaderBase<Key,Value>
,IResourceStoreManager.IVersionedResourceStoreWithVersionExtractorBase<Key,Value>
- Enclosing interface:
- IResourceStoreManager
public static interface IResourceStoreManager.IVersionedResourceStoreWithLoaderAndVersionExtractor<Key,Value> extends IResourceStoreManager.IVersionedResourceStoreWithLoaderBase<Key,Value>, IResourceStoreManager.IVersionedResourceStoreWithVersionExtractorBase<Key,Value>
Same asIResourceStoreManager.IVersionedResourceStore
, but with a loader and bound version extractor that do not need to be specified each time when requesting a value for a key.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Value
computeIfAbsent(Key key)
Gets the value for the given key.-
Methods inherited from interface de.xima.fc.common.store.versioned.IResourceStoreManager.IVersionedResourceStoreBase
computeIfAbsent, getIfPresent, remove, removeAndGetIfPresent
-
Methods inherited from interface de.xima.fc.common.store.versioned.IResourceStoreManager.IVersionedResourceStoreWithLoaderBase
computeIfAbsent
-
Methods inherited from interface de.xima.fc.common.store.versioned.IResourceStoreManager.IVersionedResourceStoreWithVersionExtractorBase
computeIfAbsent, getIfPresent, removeAndGetIfPresent
-
-
-
-
Method Detail
-
computeIfAbsent
Value computeIfAbsent(Key key) throws IOException
Gets the value for the given key. The version controls whether the value is still valid. If the version obtained from the bound version extractor is different from the stored version of the file, the value is considered stale. Stales values are discarded and reloaded 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.
-
-