|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Cache
Interface for library caching implementation. At the moment three caching levels are supported:
| Field Summary | |
|---|---|
static int |
CACHE_LEVEL_MEMORY
Cache items at memory level |
static int |
CACHE_LEVEL_NONE
Don't cache items |
static int |
CACHE_LEVEL_PERSISTENT
Cache item to persistent storage. |
| Method Summary | |
|---|---|
void |
cache(java.lang.String cacheKey,
byte[] data,
int cacheLevel)
Cache given data |
boolean |
contains(java.lang.String cacheKey)
Does this cache contain data for given cache key |
boolean |
contains(java.lang.String cacheKey,
int cacheLevel)
Does the specified cache level contain given cache key |
void |
deinitialize()
Clean up cache resources and, if needed, write cache definition/index somewhere. |
byte[] |
get(java.lang.String cacheKey)
Get cached data. |
void |
initialize()
Initialize needed resources for cache. |
| Field Detail |
|---|
static final int CACHE_LEVEL_NONE
static final int CACHE_LEVEL_MEMORY
static final int CACHE_LEVEL_PERSISTENT
| Method Detail |
|---|
void initialize()
void deinitialize()
byte[] get(java.lang.String cacheKey)
cacheKey - key that was used for data caching
void cache(java.lang.String cacheKey,
byte[] data,
int cacheLevel)
cacheKey - key for the cached datadata - data to be cachedcacheLevel - at which level this data needs to be cached (memory, rms, etc).boolean contains(java.lang.String cacheKey)
cacheKey - cache key checked
boolean contains(java.lang.String cacheKey,
int cacheLevel)
cacheKey - cache key to be checkedcacheLevel - which cache levels to check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||