CacheEntry (RabbIT/4)
Date: 2009-12-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.cache
Interface CacheEntry<K,V>

    public interface CacheEntry<K,V>

A cached object.

Author:
  Robert Olofsson

Method Summary
`long` | `getCacheTime()` Get the date this object was cached.
`V` | `getDataHook(Cache<K,V> cache)` Get the hooked data.
`long` | `getExpires()` Get the expiry-date of our file
`long` | `getHookSize()` Get the disc size of the hook, if any
`long` | `getId()` Get the id of the entry.
`K` | `getKey()` Get the key were holding data for
`long` | `getKeySize()` Get the disk size of the key, if any
`long` | `getSize()` Get the size of our file
`void` | `setCacheTime(long date)` Set the date this object was cached.
`void` | `setDataHook(V o)` Sets the data hook for this cache object.
`void` | `setExpires(long d)` Sets the expirydate of our data
`void` | `setSize(long size)` Sets the size of our data file

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).

### setCacheTime

    void setCacheTime(long date)

  Set the date this object was cached.

  Parameters:
    `date` - the date.

### getSize

    long getSize()

  Get the size of our file

  Returns:
    the size of our data

### getKeySize

    long getKeySize()

  Get the disk size of the key, if any

### getHookSize

    long getHookSize()

  Get the disc size of the hook, if any

### setSize

    void setSize(long size)

  Sets the size of our data file

  Parameters:
    `size` - the new Size

### 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(Cache<K,V> cache)

  Get the hooked data.

  Parameters:
    `cache` - the Cache this entry lives in.
  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD