org.apache.jetspeed.cache.file
Class FileCacheEntryImpl

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

public class FileCacheEntryImpl
extends Object
implements org.apache.jetspeed.cache.file.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  Object document
           
protected  File file
           
protected  long lastAccessed
           
protected  Date lastModified
           
 
Constructor Summary
private FileCacheEntryImpl()
           
  FileCacheEntryImpl(File file, Object document)
          Constructs a FileCacheEntry object
 
Method Summary
 Object getDocument()
          Get the Document
 File getFile()
          Get the file descriptor
 long getLastAccessed()
          Get the cache's lastAccessed stamp
 Date getLastModified()
          Get the entry's lastModified stamp (which may be stale compared to file's stamp)
 void setDocument(Object document)
          Set the Document in the cache
 void setFile(File file)
          Set the file descriptor
 void setLastAccessed(long lastAccessed)
          Set the cache's last accessed stamp
 void setLastModified(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 File file

document

protected Object document

lastAccessed

protected long lastAccessed

lastModified

protected Date lastModified
Constructor Detail

FileCacheEntryImpl

private FileCacheEntryImpl()

FileCacheEntryImpl

public FileCacheEntryImpl(File file,
                          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 File getFile()
Get the file descriptor

Specified by:
getFile in interface org.apache.jetspeed.cache.file.FileCacheEntry
Returns:
the file descriptor

setFile

public void setFile(File file)
Set the file descriptor

Specified by:
setFile in interface org.apache.jetspeed.cache.file.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 org.apache.jetspeed.cache.file.FileCacheEntry
Parameters:
lastAccessed - the cache's last access stamp

getLastAccessed

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

Specified by:
getLastAccessed in interface org.apache.jetspeed.cache.file.FileCacheEntry
Returns:
the cache's last accessed stamp

setLastModified

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

Specified by:
setLastModified in interface org.apache.jetspeed.cache.file.FileCacheEntry
Parameters:
lastModified - the cache's last modified stamp

getLastModified

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

Specified by:
getLastModified in interface org.apache.jetspeed.cache.file.FileCacheEntry
Returns:
the last modified stamp

setDocument

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

Specified by:
setDocument in interface org.apache.jetspeed.cache.file.FileCacheEntry
Parameters:
document - the document being cached

getDocument

public Object getDocument()
Get the Document

Specified by:
getDocument in interface org.apache.jetspeed.cache.file.FileCacheEntry
Returns:
the document being cached


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