org.apache.jetspeed.cache
Class FileCacheEntry

java.lang.Object
  extended byorg.apache.jetspeed.cache.FileCacheEntry

public class FileCacheEntry
extends java.lang.Object

FileCache entry keeps the cached content along with last access information.

Version:
$Id: FileCacheEntry.java,v 1.3 2004/02/23 02:46:05 jford Exp $
Author:
David S. Taylor David Sean Taylor

Field Summary
protected  java.lang.Object document
           
protected  java.io.File file
           
protected  long lastAccessed
           
protected  java.util.Date lastModified
           
 
Constructor Summary
FileCacheEntry(java.io.File file, java.lang.Object document)
          Constructs a FileCacheEntry object
 
Method Summary
 java.lang.Object getDocument()
          Get the Document
 java.io.File getFile()
          Get the file descriptor
 long getLastAccessed()
          Get the cache's lastAccessed stamp
 java.util.Date getLastModified()
          Get the entry's lastModified stamp (which may be stale compared to file's stamp)
 void setDocument(java.lang.Object document)
          Set the Document in the cache
 void setFile(java.io.File file)
          Set the file descriptor
 void setLastAccessed(long lastAccessed)
          Set the cache's last accessed stamp
 void setLastModified(java.util.Date lastModified)
          Set the cache's last modified stamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected java.io.File file

document

protected java.lang.Object document

lastAccessed

protected long lastAccessed

lastModified

protected java.util.Date lastModified
Constructor Detail

FileCacheEntry

public FileCacheEntry(java.io.File file,
                      java.lang.Object document)
Constructs a FileCacheEntry object

Parameters:
document - The user specific content being cached
Method Detail

getFile

public java.io.File getFile()
Get the file descriptor

Returns:
the file descriptor

setFile

public void setFile(java.io.File file)
Set the file descriptor

Parameters:
file - the new file descriptor

setLastAccessed

public void setLastAccessed(long lastAccessed)
Set the cache's last accessed stamp

Parameters:
lastAccessed - the cache's last access stamp

getLastAccessed

public long getLastAccessed()
Get the cache's lastAccessed stamp

Returns:
the cache's last accessed stamp

setLastModified

public void setLastModified(java.util.Date lastModified)
Set the cache's last modified stamp

Parameters:
lastModified - the cache's last modified stamp

getLastModified

public java.util.Date getLastModified()
Get the entry's lastModified stamp (which may be stale compared to file's stamp)

Returns:
the last modified stamp

setDocument

public void setDocument(java.lang.Object document)
Set the Document in the cache

Parameters:
document - the document being cached

getDocument

public java.lang.Object getDocument()
Get the Document

Returns:
the document being cached


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.