org.apache.jetspeed.cache.file
Class FileCacheEntryImpl

java.lang.Object
  extended by org.apache.jetspeed.cache.file.FileCacheEntryImpl
All Implemented Interfaces:
FileCacheEntry

public class FileCacheEntryImpl
extends java.lang.Object
implements FileCacheEntry

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

Version:
$Id: FileCacheEntryImpl.java 516448 2007-03-09 16:25:47Z ate $
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
FileCacheEntryImpl(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

FileCacheEntryImpl

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

Parameters:
document - The user specific content being cached
lastModified - The document's last modified stamp
Method Detail

getFile

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

Specified by:
getFile in interface FileCacheEntry
Returns:
the file descriptor

setFile

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

Specified by:
setFile in interface FileCacheEntry
Parameters:
file - the new file descriptor

setLastAccessed

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

Specified by:
setLastAccessed in interface FileCacheEntry
Parameters:
lastAccessed - the cache's last access stamp

getLastAccessed

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

Specified by:
getLastAccessed in interface FileCacheEntry
Returns:
the cache's last accessed stamp

setLastModified

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

Specified by:
setLastModified in interface FileCacheEntry
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)

Specified by:
getLastModified in interface FileCacheEntry
Returns:
the last modified stamp

setDocument

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

Specified by:
setDocument in interface FileCacheEntry
Parameters:
document - the document being cached

getDocument

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

Specified by:
getDocument in interface FileCacheEntry
Returns:
the document being cached


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.