ehcache

net.sf.ehcache.store
Class FifoMemoryStore

java.lang.Object
  extended by net.sf.ehcache.store.MemoryStore
      extended by net.sf.ehcache.store.FifoMemoryStore
All Implemented Interfaces:
Store

public class FifoMemoryStore
extends MemoryStore

First-In-First-Out (FIFO) implementation of MemoryStore.

Version:
$Id: FifoMemoryStore.java 519 2007-07-27 07:11:45Z gregluck $
Author:
Surya Suravarapu

Field Summary
 
Fields inherited from class net.sf.ehcache.store.MemoryStore
cache, diskStore, map, status
 
Constructor Summary
FifoMemoryStore(Ehcache cache, Store diskStore)
          Constructor for the FifoMemoryStore object.
 
Method Summary
protected  void doPut(Element element)
          Allow specialised actions over adding the element to the map
(package private)  Element getFirstElement()
          Returns the first eligible element that can be taken out of the cache based on the FIFO policy
 
Methods inherited from class net.sf.ehcache.store.MemoryStore
backedUp, clear, containsKey, create, dispose, evict, expireElements, flush, get, getBackingMap, getKeyArray, getQuiet, getSize, getSizeInBytes, getStatus, isFull, notifyExpiry, put, remove, removeAll, spoolAllToDisk, spoolToDisk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FifoMemoryStore

public FifoMemoryStore(Ehcache cache,
                       Store diskStore)
Constructor for the FifoMemoryStore object.

First tries to use LinkedHashMap. If not found uses Jakarta Commons collections.

Method Detail

doPut

protected final void doPut(Element element)
                    throws CacheException
Allow specialised actions over adding the element to the map

Overrides:
doPut in class MemoryStore
Parameters:
element -
Throws:
CacheException

getFirstElement

Element getFirstElement()
Returns the first eligible element that can be taken out of the cache based on the FIFO policy


ehcache