org.apache.cocoon.cache
Class CachedObject

java.lang.Object
  |
  +--org.apache.cocoon.cache.CachedObject

public class CachedObject
extends java.lang.Object

An individual object contained in a cache.

Version:
$Revision: 1.1 $ $Date: 1999/03/24 13:46:05 $
Author:
Greg Ritter

Field Summary
(package private)  java.lang.Object contents
           
(package private)  long lastAccessed
           
(package private)  long lastModified
           
 
Constructor Summary
CachedObject(java.lang.Object contents)
          Create a new CachedObject.
CachedObject(java.lang.Object contents, long timestamp)
          Create a new CachedObject with the specified timestamp.
 
Method Summary
 java.lang.Object getContents()
          Get the contents of this CachedObject.
 long getLastAccessed()
          Get the last access time for this CachedObject.
 long getLastModified()
          Get the last modification time for this CachedObject.
 java.lang.String toString()
          Get a textual representation of this CachedObject.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

contents

java.lang.Object contents

lastModified

long lastModified

lastAccessed

long lastAccessed
Constructor Detail

CachedObject

public CachedObject(java.lang.Object contents,
                    long timestamp)
Create a new CachedObject with the specified timestamp.
Parameters:
contents - the object to cache
timestamp - the timestamp to be used as the last modified and last accessed time for this CachedObject

CachedObject

public CachedObject(java.lang.Object contents)
Create a new CachedObject. Use the current system time as the timestamp.
Parameters:
object - the object to cache
Method Detail

getLastAccessed

public long getLastAccessed()
Get the last access time for this CachedObject.
Returns:
the last access time

getLastModified

public long getLastModified()
Get the last modification time for this CachedObject.
Returns:
the last modification time

getContents

public java.lang.Object getContents()
Get the contents of this CachedObject.
Returns:
the contents of this CachedObject

toString

public java.lang.String toString()
Get a textual representation of this CachedObject.
Returns:
a textual representation of this CachedObject
Overrides:
toString in class java.lang.Object

Copyright (c) 1998 The Java Apache Project