Package org.apache.juneau.internal
Class Cache<K,V> 
java.lang.Object
org.apache.juneau.internal.Cache<K,V> 
- Type Parameters:
- K- The key type.
- V- The value type.
Simple in-memory cache of objects.
 
Essentially just a wrapper around a ConcurrentHashMap.
See Also:
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
CacheConstructor- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
ofStatic creator.- Type Parameters:
- K- The key type.
- V- The value type.
- Parameters:
- key- The key type.
- type- The value type.
- Returns:
- A new builder for this object.
 
- 
getRetrieves the value with the specified key from this cache.- Parameters:
- key- The key.
- supplier- The supplier for creating this object if it's not found in the cache.
- Returns:
- The value.
 
 
-