|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.util.cache.Cache org.apache.lucene.util.cache.SimpleMapCache
public class SimpleMapCache
Simple cache implementation that uses a HashMap to store (key, value) pairs.
This cache is not synchronized, use Cache.synchronizedCache(Cache)
if needed.
Constructor Summary | |
---|---|
SimpleMapCache()
|
|
SimpleMapCache(Map map)
|
Method Summary | |
---|---|
void |
close()
Closes the cache. |
boolean |
containsKey(Object key)
Returns whether the given key is in this cache. |
Object |
get(Object key)
Returns the value for the given key. |
Set |
keySet()
Returns a Set containing all keys in this cache. |
void |
put(Object key,
Object value)
Puts a (key, value)-pair into the cache. |
Methods inherited from class org.apache.lucene.util.cache.Cache |
---|
synchronizedCache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleMapCache()
public SimpleMapCache(Map map)
Method Detail |
---|
public Object get(Object key)
Cache
get
in class Cache
public void put(Object key, Object value)
Cache
put
in class Cache
public void close()
Cache
close
in class Cache
public boolean containsKey(Object key)
Cache
containsKey
in class Cache
public Set keySet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |