Package net.sf.ehcache
Class CacheEntry
- java.lang.Object
-
- net.sf.ehcache.CacheEntry
-
public class CacheEntry extends java.lang.ObjectHelper class to tie a key to an element.This is used for operations that are identified by a key but that could benefit from additional information that's available in an element when it can be found in the cache. If the element isn't available, it will be
null.- Version:
- $Id$
- Author:
- Geert Bevin
-
-
Constructor Summary
Constructors Constructor Description CacheEntry(java.lang.Object key, Element element)Creates a new cache entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementgetElement()Retrieves the element of this cache entry.java.lang.ObjectgetKey()Retrieves the key of this cache entry.
-
-
-
Constructor Detail
-
CacheEntry
public CacheEntry(java.lang.Object key, Element element)Creates a new cache entry.- Parameters:
key- the key of the entryelement- the element of the entry ornullif no element corresponds to the key at this time
-
-
Method Detail
-
getKey
public java.lang.Object getKey()
Retrieves the key of this cache entry.- Returns:
- the request key
-
getElement
public Element getElement()
Retrieves the element of this cache entry.- Returns:
- the element that corresponds to this key or
nullif the cache entry didn't have an element that belong to the key at the time of creation.
-
-