net.sf.ehcache.store
Class FifoPolicy
java.lang.Object
   net.sf.ehcache.store.AbstractPolicy
net.sf.ehcache.store.AbstractPolicy
       net.sf.ehcache.store.FifoPolicy
net.sf.ehcache.store.FifoPolicy
- All Implemented Interfaces: 
- Policy
- public class FifoPolicy 
- extends AbstractPolicy
Contains common LFU policy code for use between the LfuMemoryStore and the DiskStore, which also
 uses an LfuPolicy for evictions.
- Version:
- $Id: FifoPolicy.java 3883 2011-04-09 18:17:18Z hhuynh $
- Author:
- Greg Luck
| Field Summary | 
| static String | NAMEThe name of this policy as a string literal
 | 
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
NAME
public static final String NAME
- The name of this policy as a string literal
 
- See Also:
- Constant Field Values
 
FifoPolicy
public FifoPolicy()
getName
public String getName()
- 
- Returns:
- the name of the Policy. Inbuilt examples are LRU, LFU and FIFO.
 
compare
public boolean compare(Element element1,
                       Element element2)
- Compares the desirableness for eviction of two elements
 Compares hit counts. If both zero,
 
- 
- Parameters:
- element1- the element to compare against
- element2- the element to compare
- Returns:
- true if the second element is preferable to the first element for ths policy
 
Copyright © 2003-2012 Terracotta, Inc.. All Rights Reserved.