|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.object.ObjectCache
Implementation of a single keyed generic cache of Java objects
Nested Class Summary | |
(package private) class |
ObjectCache.CacheObject
inner class used to store cached objects |
Field Summary | |
private Hashtable |
cache
|
private long |
timeToLive
|
Constructor Summary | |
ObjectCache()
create a new ObjectCache with items that do not expire |
|
ObjectCache(long timeToLive)
create a new ObjectCache with items that will expire after timeToLive milliseconds |
Method Summary | |
Object |
get(Object key)
retrieve an object from the cache |
void |
put(Object key,
Object object)
insert an item into the cache, retrievable using key |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Hashtable cache
private long timeToLive
Constructor Detail |
public ObjectCache()
public ObjectCache(long timeToLive)
Method Detail |
public void put(Object key, Object object)
java.lang.NullPointerException
- if key is nullpublic Object get(Object key)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |