|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface allows for multiple implementations of a cache presumably with different caching algrithms.
Method Summary | |
void |
addCacheable(Cacheable cacheable)
Adds an object to the cache |
void |
clear()
Clears the cache of all cacheables |
void |
expire()
Removes all the expired objects from the cache |
Cacheable |
getCacheable(java.lang.Object identifier)
Gets a cached object |
java.lang.String |
getName()
Gets the name of the cache |
int |
getSize()
Gets the maximum number of objects it can cache |
void |
removeCacheable(java.lang.Object identifier)
Removes a cached object |
void |
setName(java.lang.String name)
Sets the name of the cache |
void |
setSize(int size)
Sets the maximum number of objects it will cache |
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The namepublic int getSize()
public void setSize(int size)
size
- The size of the cachepublic Cacheable getCacheable(java.lang.Object identifier)
identifier
- The key to find the object
public void removeCacheable(java.lang.Object identifier)
identifier
- The key of the object to removepublic void expire()
public void addCacheable(Cacheable cacheable)
cacheable
- The object to addpublic void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |