|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cache
An interface for a cache keyed by a String with a byte array as data.
Nested Class Summary | |
---|---|
static class |
Cache.Entry
Data and metadata for an entry returned by the cache. |
Method Summary | |
---|---|
void |
clear()
Empties the cache. |
Cache.Entry |
get(String key)
Retrieves an entry from the cache. |
void |
initialize()
Performs any potentially long-running actions needed to initialize the cache; will be called from a worker thread. |
void |
invalidate(String key,
boolean fullExpire)
Invalidates an entry in the cache. |
void |
put(String key,
Cache.Entry entry)
Adds or replaces an entry to the cache. |
void |
remove(String key)
Removes an entry from the cache. |
Method Detail |
---|
Cache.Entry get(String key)
key
- Cache key
Cache.Entry
or null in the event of a cache missvoid put(String key, Cache.Entry entry)
key
- Cache keyentry
- Data to store and metadata for cache coherency, TTL, etc.void initialize()
void invalidate(String key, boolean fullExpire)
key
- Cache keyfullExpire
- True to fully expire the entry, false to soft expirevoid remove(String key)
key
- Cache keyvoid clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |