Package org.cache2k.integration
Interface FunctionalCacheLoader<K,V>
-
- All Superinterfaces:
CacheLoader<K,V>,Customization,DataAware<K,V>,DataAwareCustomization<K,V>
- All Known Implementing Classes:
CacheLoader
@Deprecated public interface FunctionalCacheLoader<K,V> extends CacheLoader<K,V>
Deprecated.Replaced withCacheLoader, to be removed in version 2.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Vload(K key)Deprecated.Retrieves or generates data based on the key.
-
-
-
Method Detail
-
load
V load(K key) throws Exception
Deprecated.Description copied from interface:CacheLoaderRetrieves or generates data based on the key.From inside this method it is illegal to call methods on the same cache. This may cause a deadlock.
API rationale: This method declares an exception to allow any unhandled exceptions of the loader implementation to just pass through. Since the cache needs to catch an deal with loader exceptions in any way, this saves otherwise necessary try/catch clauses in the loader.
- Specified by:
loadin interfaceCacheLoader<K,V>- Parameters:
key- the non-null key to provide the value for.- Returns:
- value to be associated with the key. If the cache does not permit
nullvalues aNullPointerExceptionis thrown, but the expiry policy is called before it. - Throws:
Exception- Unhandled exception from the loader. Exceptions are suppressed or wrapped and rethrown via aCacheLoaderException- See Also:
CacheLoader.load(Object)
-
-