|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.ObjectCacheInstance
public class ObjectCacheInstance
The ObjectCacheInstance is a utility class to cache/store objects for a
period of time. The cache handles the object expiration and the access to the
cached objects. The cache stores an object with a unique access key. With this
access key it's possible to access the object from the store.
| Constructor Summary | |
|---|---|
ObjectCacheInstance()
Creates a new instance of ObjectCacheInstance. |
|
| Method Summary | |
|---|---|
static Object |
createKey()
Creates a random acces key. |
Object |
get(Object pKey)
Gets an object from the cache. |
Object |
put(IValidatable pObject)
Puts a validatable object to the cache. |
Object |
put(Object pKey,
IValidatable pObject)
Puts a validatable object to the cache, with a specific key. |
Object |
put(Object pObject,
long pTimeout)
Puts an object to the cache, with a timeout for expiration. |
Object |
put(Object pKey,
Object pObject,
long pTimeout)
Puts an object to the cache, with a specific key and timeout for expiration. |
Object |
remove(Object pKey)
Removes an object from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectCacheInstance()
ObjectCacheInstance.
| Method Detail |
|---|
public static Object createKey()
public Object put(Object pObject,
long pTimeout)
pObject - the cachable objectpTimeout - the timeout (in millis) for the object. After this time, the
object will be removed from the cache
public Object put(IValidatable pObject)
pObject - the cachable object
public Object put(Object pKey,
Object pObject,
long pTimeout)
pKey - the key for accessing the objectpObject - the cachable objectpTimeout - the timeout (in millis) for the object. After this time, the
object will be removed from the cache
null if there was no previous object
or the object is expired
public Object put(Object pKey,
IValidatable pObject)
pKey - the key for accessing the objectpObject - the cachable object
null if there was no previous object
or the object is expiredpublic Object get(Object pKey)
pKey - the access key of the object
null if the object was expired or
the key was not foundpublic Object remove(Object pKey)
pKey - the access key of the object
null if the object was expired or
the key was not found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||