Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiCacheEntry

All Superinterfaces:
Serializable

public interface EbiCacheEntry
extends Serializable

Interface for an entry in the memory cache or disk cache. For information about the types of caches, see EbiCacheManager.


Method Summary
 String getContentKey()
          Gets the key of the content stored in this cache entry.
 Object getContents()
          Gets the content for this cache entry.
 long getContentSize()
          Gets the size of the content stored in this cache entry.
 int getContentType()
          Gets the type of the content stored in this cache entry.
 void removeEntry()
          Removes this cache entry from the cache.
 void setContents(Object contents)
          Changes the content of this cache entry.
 void useEntry()
          Marks the cache entry as recently used.
 

Method Detail

useEntry

public void useEntry()
Marks the cache entry as recently used. This moves the cache entry to the head of the least-recently-used (LRU) list, reducing its chances of being automatically purged from the cache.

Director calls this method each time the cache holder reuses this entry.


removeEntry

public void removeEntry()
Removes this cache entry from the cache. This method has the same effect as calling one of the removeValue methods for the cache holder.

getContentSize

public long getContentSize()
Gets the size of the content stored in this cache entry.
Returns:
The size in bytes of the content stored in this cache entry.

getContentType

public int getContentType()
Gets the type of the content stored in this cache entry.
Returns:
The type of the content stored in this cache entry. Possible values are defined in EbiCacheConstants:

getContentKey

public String getContentKey()
Gets the key of the content stored in this cache entry.
Returns:
A String that is the key.

setContents

public void setContents(Object contents)
                 throws IOException
Changes the content of this cache entry.
Parameters:
contents - An object that contains the content.
Throws:
IOException -  

getContents

public Object getContents()
                   throws IOException
Gets the content for this cache entry.
Returns:
An object that contains the content.
Throws:
IOException -  

Novell exteNd
Director 5.2 API