java.lang.Object
com.sun.faces.util.Cache<K,V>
A concurrent caching mechanism.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFactory interface for creating various cacheable objects. -
Constructor Summary
ConstructorsConstructorDescriptionCache(Cache.Factory<K, V> factory) Constructs this cache using the specifiedFactory. -
Method Summary
-
Constructor Details
-
Cache
Constructs this cache using the specifiedFactory.- Parameters:
factory- a factory to create or retrieve the element that need to be cached
-
-
Method Details
-
get
If a value isn't associated with the specified key, a newCallablewill be created wrapping theFactoryspecified via the constructor and passed to aFutureTask. This task will be passed to the backing ConcurrentMap. WhenFutureTask.get()is invoked, the Factory will return the new Value which will be cached by theFutureTask.- Parameters:
key- the key the value is associated with- Returns:
- the value for the specified key, if any
-
remove
-