Class FutureCache<K,V,C>
java.lang.Object
org.exoplatform.services.cache.future.FutureCache<K,V,C>
- Direct Known Subclasses:
FutureExoCache
A future cache that prevents the loading of the same resource twice. This should be used when the resource
to load is very expensive or cannot be concurrently retrieved (like a classloading).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FutureCache
-
-
Method Details
-
get
-
put
-
putOnly
-
get
Perform a cache lookup for the specified key within the specified context. When the value cannot be loaded (because it does not exist or it failed or anything else that does not come to my mind), the value null is returned.- Parameters:
context- the context in which the resource is accessedkey- the key identifying the resource- Returns:
- the value
-