|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache<K,V>
| Nested Class Summary | |
|---|---|
static interface |
Cache.CacheFilter<V>
CacheFileter is used to select values to remove during a removeAll invocation. |
static interface |
Cache.CacheListener<V>
Callback listener for cache events. |
| Method Summary | |
|---|---|
void |
add(K key,
V value)
Add a new entry to the cache. |
void |
checkIn(K key)
Marks the entry available, so it can be accessed again. |
V |
checkOut(K key)
Marks the entry checked-out, so this entry can not be accessed until checked-in. |
Cache.CacheListener<V> |
getListener()
Gets the listener for cache events. |
V |
remove(K key)
Removes the entry from the cache. |
void |
removeAll(Cache.CacheFilter<V> filter)
Removes all of th entries that match the specified filter. |
void |
setListener(Cache.CacheListener<V> listener)
Sets the listener for cache events. |
| Method Detail |
|---|
Cache.CacheListener<V> getListener()
void setListener(Cache.CacheListener<V> listener)
void add(K key,
V value)
V checkOut(K key)
throws Exception
IllegalStateException - if the entry is already checked out.
Exception - if an entry is loaded and the afterLoad method threw an
exceptionvoid checkIn(K key)
IllegalStateException - if the entry is not checked out.V remove(K key)
void removeAll(Cache.CacheFilter<V> filter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||