Package lumis.portal.cache
Interface ICacheMultiDataProvider<T>
-
- Type Parameters:
T
- the type of the value in the cache.
- All Known Implementing Classes:
SingleOrBulkLoadCacheDataProvider
public interface ICacheMultiDataProvider<T>
A cache data provider that may return multiple data during a load request.- Since:
- 10.0.0
- Version:
- $Revision: 19766 $ $Date: 2017-01-05 18:35:09 -0200 (Thu, 05 Jan 2017) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ICacheMultiDataProvider.IRequest
Contains information about a request done to aICacheMultiDataProvider
.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default T
getDefaultValue()
The value to use for requested keys not returned byloadData(IRequest)
.Collection<CacheItem<T>>
loadData(ICacheMultiDataProvider.IRequest request)
Returns the data to be loaded into the cache.
-
-
-
Method Detail
-
loadData
Collection<CacheItem<T>> loadData(ICacheMultiDataProvider.IRequest request) throws PortalException
Returns the data to be loaded into the cache.- Parameters:
request
- a request object containing information about the requested data.- Returns:
- a collection of cache items to be cached. If a cache item for the requested key is not present in the
returned collection, it will be assumed its value is
getDefaultValue()
. - Throws:
PortalException
- Since:
- 10.0.0
-
getDefaultValue
default T getDefaultValue()
The value to use for requested keys not returned byloadData(IRequest)
.- Returns:
- the value.
- Since:
- 10.0.0
-
-