Constructor and Description |
---|
SortedMapBackedCache() |
Modifier and Type | Method and Description |
---|---|
void |
add(Map<String,Object> rec)
Adds a document.
|
void |
close()
Releases resources used by this cache, if possible.
|
void |
delete(Object key)
Delete all documents associated with the given key
|
void |
deleteAll()
Delete all data from the cache,leaving the empty cache intact.
|
void |
destroy()
Closes the cache, if open.
|
void |
flush()
Persists any pending data to the cache
|
Iterator<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.
|
void |
open(Context context)
Opens the cache using the specified properties.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public void add(Map<String,Object> rec)
DIHCache
Adds 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).
public void close()
DIHCache
Releases resources used by this cache, if possible. The cache is flushed but not destroyed.
public void delete(Object key)
DIHCache
Delete all documents associated with the given key
public void deleteAll()
DIHCache
Delete all data from the cache,leaving the empty cache intact.
public void destroy()
DIHCache
Closes the cache, if open. Then removes all data, possibly removing the cache entirely from persistent storage.
public void flush()
DIHCache
Persists any pending data to the cache
public Iterator<Map<String,Object>> iterator(Object key)
DIHCache
Returns an iterator, allowing callers to iterate through all documents that match the given key in insertion order.
public Iterator<Map<String,Object>> iterator()
DIHCache
Returns an iterator, allowing callers to iterate through the entire cache in key, then insertion, order.
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.