Save This Page
Home » oscache-2.4.1-full » com.opensymphony.oscache » base » algorithm » [javadoc | source]
com.opensymphony.oscache.base.algorithm
public class: FIFOCache [javadoc | source]
java.lang.Object
   com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
      com.opensymphony.oscache.base.algorithm.FIFOCache
FIFO (First In First Out) based queue algorithm for the cache. No synchronization is required in this class since the AbstractConcurrentReadCache already takes care of any synchronization requirements.
Constructor:
 public FIFOCache() 
 public FIFOCache(int capacity) 
Method from com.opensymphony.oscache.base.algorithm.FIFOCache Summary:
itemPut,   itemRemoved,   itemRetrieved,   removeItem
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.oscache.base.algorithm.FIFOCache Detail:
 protected  void itemPut(Object key) 
    An object was put in the cache. This implementation just adds the key to the end of the list if it doesn't exist in the list already.
 protected  void itemRemoved(Object key) 
    Remove specified key since that object has been removed from the cache.
 protected  void itemRetrieved(Object key) 
    An object was retrieved from the cache. This implementation does noting since this event has no impact on the FIFO algorithm.
 protected Object removeItem() 
    An item needs to be removed from the cache. The FIFO implementation removes the first element in the list (ie, the item that has been in the cache for the longest time).