rabbit.cache
Interface CacheEntry<K,V>

Type Parameters:
K - the key type of this cache entry
V - the data resource

public interface CacheEntry<K,V>

A cached object.

Author:
Robert Olofsson

Method Summary
 long getCacheTime()
          Get the date this object was cached.
 V getDataHook()
          Get the hooked data.
 long getExpires()
          Get the expiry-date of our file
 long getId()
          Get the id of the entry.
 K getKey()
          Get the key were holding data for
 long getSize()
          Get the size of our file
 void setDataHook(V o)
          Sets the data hook for this cache object.
 void setExpires(long d)
          Sets the expirydate of our data
 

Method Detail

getId

long getId()
Get the id of the entry.

Returns:
the id of the entry.

getKey

K getKey()
Get the key were holding data for

Returns:
the key object

getCacheTime

long getCacheTime()
Get the date this object was cached.

Returns:
a date (millis since the epoch).

getSize

long getSize()
Get the size of our file

Returns:
the size of our data

getExpires

long getExpires()
Get the expiry-date of our file

Returns:
the expiry date of our data

setExpires

void setExpires(long d)
Sets the expirydate of our data

Parameters:
d - the new expiry-date.

getDataHook

V getDataHook()
Get the hooked data.

Returns:
the the hooked data.

setDataHook

void setDataHook(V 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.