Class CacheEntry


  • public class CacheEntry
    extends java.lang.Object
    Helper 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
      Element getElement()
      Retrieves the element of this cache entry.
      java.lang.Object getKey()
      Retrieves the key of this cache entry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CacheEntry

        public CacheEntry​(java.lang.Object key,
                          Element element)
        Creates a new cache entry.
        Parameters:
        key - the key of the entry
        element - the element of the entry or null if 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 null if the cache entry didn't have an element that belong to the key at the time of creation.