Interface LoadingStrategy
- All Known Implementing Classes:
DefaultFileLoadingStrategy,DefaultResourceLoadingStrategy
public interface LoadingStrategy
A strategy that loads binary information from a configured source.
-
Method Summary
Modifier and TypeMethodDescriptionGet a friendly name source identifier to use in log statements.byte[]load(CacheLoadingContext context) Load cache data from a source.
-
Method Details
-
getSourceIdentifier
Get a friendly name source identifier to use in log statements.- Returns:
- the source identifier friendly name.
-
load
Load cache data from a source. If the source data has not changed from the last time it was loaded (as specified in theCacheLoadingContext) anullshould be returned. If source data can not be loaded for a known and accepted reason, anullshould be returned. For any other error in loading cache data, theCacheLoadingExceptionshould be thrown.- Parameters:
context- the cache loading context- Returns:
- the cache information as bytes.
- Throws:
CacheLoadingException- if there is an error loading the cache.
-