com.opencms.file
Class CmsCachedObject

java.lang.Object
  |
  +--com.opencms.file.CmsCachedObject
All Implemented Interfaces:
Cloneable

public class CmsCachedObject
extends Object
implements Cloneable

Defines one individual object stored in the DBCacheFile and method to access it

Version:
$Revision: 1.12 $ $Date: 2003/04/01 15:20:18 $
Author:
Michael Emmerich, Andreas Schoutem

Constructor Summary
CmsCachedObject(Object contents)
          Creates a new CmsCachedObject.
CmsCachedObject(Object contents, long timestamp)
          Creates a new CmsCachedObject.
 
Method Summary
 Object clone()
          Clones the CachedObject.
 Object getContents()
          Gets the contents of this CmsCacheObject.
 long getTimestamp()
          Gets the last access time for this CmsCacheObject.
 void setTimestamp()
          Sets the last access time for this CmsCacheObject.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsCachedObject

public CmsCachedObject(Object contents)
Creates a new CmsCachedObject. The current system time is used as the timestamp.

Parameters:
contents - The object to be stored in the CmsCache.

CmsCachedObject

public CmsCachedObject(Object contents,
                       long timestamp)
Creates a new CmsCachedObject.

Parameters:
contents - The object to be stored in the CmsCache.
timestamp - The timestamp for the new Object.
Method Detail

clone

public Object clone()
Clones the CachedObject. This is needed to return only clones of the objects stored in the cache

Overrides:
clone in class Object

getContents

public Object getContents()
Gets the contents of this CmsCacheObject. The last access time of the Cache object is set tu the current system time.

Returns:
Contents of the CmsCacheObject.

getTimestamp

public long getTimestamp()
Gets the last access time for this CmsCacheObject.

Returns:
The last access time.

setTimestamp

public void setTimestamp()
Sets the last access time for this CmsCacheObject.