rabbit.cache
Class NCacheEntry

java.lang.Object
  extended byrabbit.cache.NCacheEntry
All Implemented Interfaces:
java.io.Serializable

public class NCacheEntry
extends java.lang.Object
implements java.io.Serializable

A cached object.

See Also:
Serialized Form

Constructor Summary
NCacheEntry(java.lang.Object key, java.lang.String filename, long id)
          Create a new CacheEntry for given key and filename
 
Method Summary
 java.util.Date getCacheTime()
          Get the date this object was cached.
 java.lang.Object getDataHook()
          Get the hooked data.
 java.util.Date getExpires()
          Get the expiry-date of our file
 java.lang.String getFileName()
          Get the filename were data is stored
 long getId()
          Get the id of our entry.
 java.lang.Object getKey()
          Get the key were holding data for
 long getSize()
          Get the size of our file
 void setCacheTime(java.util.Date date)
          Set the date this object was cached.
 void setDataHook(java.lang.Object o)
          Sets the data hook for this cache object.
 void setExpires(java.util.Date d)
          Sets the expirydate of our data
 void setSize(long size)
          Sets the size of our data
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NCacheEntry

public NCacheEntry(java.lang.Object key,
                   java.lang.String filename,
                   long id)
Create a new CacheEntry for given key and filename

Parameters:
key - the key for the object.
filename - the filename were we store our data
Method Detail

getFileName

public java.lang.String getFileName()
Get the filename were data is stored

Returns:
a filename

getKey

public java.lang.Object getKey()
Get the key were holding data for

Returns:
the keyobject

getCacheTime

public java.util.Date getCacheTime()
Get the date this object was cached.

Returns:
a date.

setCacheTime

public void setCacheTime(java.util.Date date)
Set the date this object was cached.

Parameters:
date - the date.

getSize

public long getSize()
Get the size of our file

Returns:
the size of our data

setSize

public void setSize(long size)
Sets the size of our data

Parameters:
size - the new Size

getExpires

public java.util.Date getExpires()
Get the expiry-date of our file

Returns:
the expiry date of our data

setExpires

public void setExpires(java.util.Date d)
Sets the expirydate of our data

Parameters:
d - the new expiry-date.

getId

public long getId()
Get the id of our entry.

Returns:
the id of the entry.

getDataHook

public java.lang.Object getDataHook()
Get the hooked data.

Returns:
the the hooked data.

setDataHook

public void setDataHook(java.lang.Object o)
Sets the data hook for this cache object. Since it is not always possible to make the key hold this...

Parameters:
o - the new data.