Interface LazyLoader<S,D>
- 
- All Known Implementing Classes:
- DefaultLazyLoader
 
 public interface LazyLoader<S,D>A functional interface that can be used to return data Dfrom a sourceSwhere implementations are free to define how and when data is fetched from source as well how it is internally cached.The source does not need to worry about caching data but always fetch data as demanded. The way data will actually be cached is an implementation detail. - Author:
- Pedro Igor
- See Also:
- DefaultLazyLoader
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Dget(Supplier<S> source)Returns data from the givensource.
 
- 
- 
- 
Method Detail- 
getD get(Supplier<S> source) Returns data from the givensource. Data is only fetched fromsourceonce and only if necessary, it is up to implementations to decide the momentum to actually fetch data from source.- Parameters:
- source- the source from where data will be fetched.
- Returns:
- the data from source
 
 
- 
 
-