org.jboss.cache.eviction
Class LFUQueue.LFUComparator
java.lang.Object
org.jboss.cache.eviction.LFUQueue.LFUComparator
- All Implemented Interfaces:
- Comparator<NodeEntry>
- Enclosing class:
- LFUQueue
protected static class LFUQueue.LFUComparator
- extends Object
- implements Comparator<NodeEntry>
Comparator class for LFU.
This class will sort the eviction queue in the correct eviction order.
The top of the list should evict before the bottom of the list.
The sort is based on ascending order of nodeVisits.
Note: this class has a natural ordering that is inconsistent with equals as defined by the java.lang.Comparator
contract.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LFUQueue.LFUComparator
protected LFUQueue.LFUComparator()
compare
public int compare(NodeEntry ne1,
NodeEntry ne2)
- Specified by:
compare
in interface Comparator<NodeEntry>
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.