org.opencms.cache
Interface I_CmsLruCacheObject

All Known Implementing Classes:
CmsFlexCacheEntry

public interface I_CmsLruCacheObject

Defines the methods which an object being cached by CmsFlexLruCache must implement.

CmsFlexLruCache is organized as a double linked list, that's why objects implementing this interface need getters/setter for the next/previous nodes in the list of all cached objects.

Since:
6.0.0
Version:
$Revision: 1.12 $
Author:
Thomas Weckert
See Also:
CmsLruCache

Method Summary
 void addToLruCache()
          Invoked after an object was added to the cache.
 int getLruCacheCosts()
          Returns the cache costs of this object, as for example it's byte size.
 I_CmsLruCacheObject getNextLruObject()
          Returns the next object in the double linked list of all cached objects.
 I_CmsLruCacheObject getPreviousLruObject()
          Returns the previous object in the double linked list of all cached objects.
 java.lang.Object getValue()
          Returns the Object value.
 void removeFromLruCache()
          Invoked after the object was removed to the cache.
 void setNextLruObject(I_CmsLruCacheObject theNextObject)
          Set the next object in the double linked list of all cached objects.
 void setPreviousLruObject(I_CmsLruCacheObject thePreviousObject)
          Set the previous object in the double linked list of all cached objects.
 

Method Detail

setNextLruObject

void setNextLruObject(I_CmsLruCacheObject theNextObject)
Set the next object in the double linked list of all cached objects.

Parameters:
theNextObject - the next object

getNextLruObject

I_CmsLruCacheObject getNextLruObject()
Returns the next object in the double linked list of all cached objects.

Returns:
the next object in the double linked list of all cached objects

setPreviousLruObject

void setPreviousLruObject(I_CmsLruCacheObject thePreviousObject)
Set the previous object in the double linked list of all cached objects.

Parameters:
thePreviousObject - the previous object

getPreviousLruObject

I_CmsLruCacheObject getPreviousLruObject()
Returns the previous object in the double linked list of all cached objects.

Returns:
the previous object in the double linked list of all cached objects

addToLruCache

void addToLruCache()
Invoked after an object was added to the cache.


removeFromLruCache

void removeFromLruCache()
Invoked after the object was removed to the cache.


getLruCacheCosts

int getLruCacheCosts()
Returns the cache costs of this object, as for example it's byte size.

Returns:
the cache costs of this object

getValue

java.lang.Object getValue()
Returns the Object value.

Returns:
the Object value