|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oroad.stxx.cache.SimpleCacheImpl
Basic implementation an LRU cache.
| Constructor Summary | |
SimpleCacheImpl()
Creates the cache |
|
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleCacheImpl()
| Method Detail |
public java.lang.String getName()
getName in interface Cachepublic void setName(java.lang.String name)
setName in interface Cachename - The namepublic int getSize()
getSize in interface Cachepublic void setSize(int size)
setSize in interface Cachesize - The size of the cachepublic void removeCacheable(java.lang.Object identifier)
removeCacheable in interface Cacheidentifier - The key of the object to removepublic Cacheable getCacheable(java.lang.Object identifier)
getCacheable in interface Cacheidentifier - The key to find the object
public void expire()
expire in interface Cachepublic void addCacheable(Cacheable cacheable)
addCacheable in interface Cachecacheable - The object to addpublic void clear()
clear in interface Cache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||