|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.util.cache.Cache<K,V>
public abstract class Cache<K,V>
Base class for cache implementations.
| Constructor Summary | |
|---|---|
Cache()
|
|
| Method Summary | ||
|---|---|---|
abstract void |
close()
Closes the cache. |
|
abstract boolean |
containsKey(Object key)
Returns whether the given key is in this cache. |
|
abstract V |
get(Object key)
Returns the value for the given key. |
|
abstract void |
put(K key,
V value)
Puts a (key, value)-pair into the cache. |
|
static
|
synchronizedCache(Cache<K,V> cache)
Returns a thread-safe cache backed by the specified cache. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Cache()
| Method Detail |
|---|
public static <K,V> Cache<K,V> synchronizedCache(Cache<K,V> cache)
public abstract void put(K key,
V value)
public abstract V get(Object key)
public abstract boolean containsKey(Object key)
public abstract void close()
close in interface Closeable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||