Class SortedMapBackedCache
- java.lang.Object
-
- org.apache.solr.handler.dataimport.SortedMapBackedCache
-
-
Constructor Summary
Constructors Constructor Description SortedMapBackedCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Map<String,Object> rec)Adds a document.voidclose()Releases resources used by this cache, if possible.voiddelete(Object key)Delete all documents associated with the given keyvoiddeleteAll()Delete all data from the cache,leaving the empty cache intact.voiddestroy()Closes the cache, if open.voidflush()Persists any pending data to the cacheIterator<Map<String,Object>>iterator()Returns an iterator, allowing callers to iterate through the entire cache in key, then insertion, order.Iterator<Map<String,Object>>iterator(Object key)Returns an iterator, allowing callers to iterate through all documents that match the given key in insertion order.voidopen(Context context)Opens the cache using the specified properties.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
add
public void add(Map<String,Object> rec)
Description copied from interface:DIHCacheAdds a document. If a document already exists with the same key, both documents will exist in the cache, as the cache allows duplicate keys. To update a key's documents, first call delete(Object key).
-
close
public void close()
Description copied from interface:DIHCacheReleases resources used by this cache, if possible. The cache is flushed but not destroyed.
-
delete
public void delete(Object key)
Description copied from interface:DIHCacheDelete all documents associated with the given key
-
deleteAll
public void deleteAll()
Description copied from interface:DIHCacheDelete all data from the cache,leaving the empty cache intact.
-
destroy
public void destroy()
Description copied from interface:DIHCacheCloses the cache, if open. Then removes all data, possibly removing the cache entirely from persistent storage.
-
flush
public void flush()
Description copied from interface:DIHCachePersists any pending data to the cache
-
iterator
public Iterator<Map<String,Object>> iterator(Object key)
Description copied from interface:DIHCacheReturns an iterator, allowing callers to iterate through all documents that match the given key in insertion order.
-
iterator
public Iterator<Map<String,Object>> iterator()
Description copied from interface:DIHCacheReturns an iterator, allowing callers to iterate through the entire cache in key, then insertion, order.
-
-