palio.modules.cache
Class LRUList.Entry

java.lang.Object
  extended by palio.modules.cache.LRUList.Entry
Enclosing class:
LRUList

public final class LRUList.Entry
extends java.lang.Object

Element of the LRU list. Contains previous / next pointers and user accesible content field.


Field Summary
 java.lang.Object key
          This field may be used to keep the key associated with the Entry content.
 java.lang.Object tag
          This field may be used to keep an arbitrary object associated with the Entry.
 
Method Summary
 java.lang.Object getContent()
           
 boolean isFirst()
           
 boolean isLast()
           
 void remove()
          Removes entry from the LRU list.
 void setContent(java.lang.Object obj)
           
 void toEnd()
          Moves entry to the end of the LRU list.
 void toFront()
          Moves entry to the front of the LRU list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

public java.lang.Object tag
This field may be used to keep an arbitrary object associated with the Entry.


key

public java.lang.Object key
This field may be used to keep the key associated with the Entry content.

Method Detail

getContent

public java.lang.Object getContent()

setContent

public void setContent(java.lang.Object obj)

toFront

public void toFront()
Moves entry to the front of the LRU list.


toEnd

public void toEnd()
Moves entry to the end of the LRU list.


remove

public void remove()
Removes entry from the LRU list.


isFirst

public boolean isFirst()
Returns:
Determines if the entry is the first on the list (most recently used).

isLast

public boolean isLast()
Returns:
Determines if the entry is the last on the list (least recently used).