|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cache
A Cache
object
A cache must call CacheManager.getInstance().add(this)
to take part in the dynamic memory distribution.
Method Summary | |
---|---|
long |
getAccessCount()
Get the number of accesses (get or set) until resetAccessCount was called. |
long |
getMaxMemorySize()
Get the current limit. |
long |
getMemoryUsed()
Get the amount of used memory. |
void |
resetAccessCount()
Reset the access counter. |
void |
setAccessListener(CacheAccessListener listener)
Add a listener to this cache that is informed after a number of accesses. |
void |
setMaxMemorySize(long size)
Set the new memory limit. |
Method Detail |
---|
void setMaxMemorySize(long size)
size
- the size in byteslong getMaxMemorySize()
long getMemoryUsed()
long getAccessCount()
void resetAccessCount()
void setAccessListener(CacheAccessListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |