|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface Cache
The cache keeps frequently used objects in the main memory.
| Method Summary | |
|---|---|
void |
clear()
Clear the cache. |
CacheObject |
find(int pos)
Get an element from the cache if it is available. |
CacheObject |
get(int pos)
Get an element in the cache if it is available. |
java.util.ArrayList<CacheObject> |
getAllChanged()
Get all objects in the cache that have been changed. |
int |
getMaxMemory()
Get the maximum memory to be used. |
int |
getMemory()
Get the used size in KB. |
void |
put(CacheObject r)
Add an element to the cache. |
boolean |
remove(int pos)
Remove an object from the cache. |
void |
setMaxMemory(int size)
Set the maximum memory to be used by this cache. |
CacheObject |
update(int pos,
CacheObject record)
Update an element in the cache. |
| Method Detail |
|---|
java.util.ArrayList<CacheObject> getAllChanged()
void clear()
CacheObject get(int pos)
pos - the unique key of the element
void put(CacheObject r)
r - the object
CacheObject update(int pos,
CacheObject record)
pos - the unique key of the elementrecord - the element
boolean remove(int pos)
pos - the unique key of the element
CacheObject find(int pos)
pos - the unique key of the element
void setMaxMemory(int size)
size - the maximum size in KBint getMaxMemory()
int getMemory()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||