Package org.apache.solr.common.util
Class ObjectCache
- java.lang.Object
- 
- org.apache.solr.common.util.MapBackedCache<String,Object>
- 
- org.apache.solr.common.util.ObjectCache
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- SolrCloseable,- Cache<String,Object>
 
 public class ObjectCache extends MapBackedCache<String,Object> implements SolrCloseable Simple object cache with a type-safe accessor.
- 
- 
Field Summary- 
Fields inherited from class org.apache.solr.common.util.MapBackedCachemap
 
- 
 - 
Constructor SummaryConstructors Constructor Description ObjectCache()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclose()<T> TcomputeIfAbsent(String key, Class<T> clazz, Function<String,? extends T> mappingFunction)Objectget(String key)<T> Tget(String key, Class<T> clazz)booleanisClosed()Objectput(String key, Object val)Objectremove(String key)- 
Methods inherited from class org.apache.solr.common.util.MapBackedCacheasMap, computeIfAbsent
 
- 
 
- 
- 
- 
Method Detail- 
clearpublic void clear() 
 - 
computeIfAbsentpublic <T> T computeIfAbsent(String key, Class<T> clazz, Function<String,? extends T> mappingFunction) 
 - 
isClosedpublic boolean isClosed() - Specified by:
- isClosedin interface- SolrCloseable
 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
 
- 
 
-