org.jtools.cache
Class CachedObject

java.lang.Object
  extended byorg.jtools.cache.CachedObject
All Implemented Interfaces:
Cacheable

public class CachedObject
extends java.lang.Object
implements Cacheable

 Cached Object Class
 

Version:
$Id: CachedObject.java,v 1.3 2002/08/07 16:51:09 stfndln Exp $
Author:
Stefaan Delanghe (stfndln@yahoo.com)

Field Summary
 java.lang.Object getObject
          The cached object
 java.lang.Object objIdentifier
          Identifier of the object
 
Constructor Summary
CachedObject(java.lang.Object p_value, java.lang.Object p_id, int p_livetime)
          Creates a new cache object.
 
Method Summary
 java.lang.Object getIdentifier()
          retrieve the identiefer of the cached object
 boolean isExpired()
          chechs if the cached object has expired.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objIdentifier

public java.lang.Object objIdentifier
Identifier of the object


getObject

public java.lang.Object getObject
The cached object

Constructor Detail

CachedObject

public CachedObject(java.lang.Object p_value,
                    java.lang.Object p_id,
                    int p_livetime)
Creates a new cache object.

Parameters:
p_value - Object Value that needs to be cached
p_id - Object Identiefier of the value cached
p_livetime - int live time of the value in the cache
Method Detail

isExpired

public boolean isExpired()
chechs if the cached object has expired.

Specified by:
isExpired in interface Cacheable
Returns:
boolean if the cached object has expired returns true otherwise return false

getIdentifier

public java.lang.Object getIdentifier()
retrieve the identiefer of the cached object

Specified by:
getIdentifier in interface Cacheable
Returns:
Object The identifier