V - type of the data to retrieve.@FunctionalInterface public interface DataProvider<V>
The assumption behind this interface is that the given key is able to uniquely identify the related data and therefore contains all the information needed to retrieve it.
This is a functional interface and therefore is
intended to be implemented using Java8 Lambdas.
The throws Exception in the retrieve(CacheKey)
methods allows the implementations to throw any type of exception.
| Modifier and Type | Method and Description |
|---|---|
V |
retrieve(CacheKey key)
Returns the data to cache in relation with
the given key.
|
Copyright © 2011–2020 Nerd4j. All rights reserved.