KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > eviction > LFUPolicy


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.cache.eviction;
8
9 /**
10  * Least Frequently Used Eviction Policy.
11  *
12  * @author Daniel Huang - dhuang@jboss.org - 10/2005
13  * @version $Revision: 1.1 $
14  */

15 public class LFUPolicy extends BaseEvictionPolicy implements EvictionPolicy
16 {
17    private LFUAlgorithm algorithm;
18
19    public LFUPolicy()
20    {
21       super();
22       algorithm = new LFUAlgorithm();
23    }
24
25    public EvictionAlgorithm getEvictionAlgorithm()
26    {
27       return algorithm;
28    }
29
30    public Class JavaDoc getEvictionConfigurationClass()
31    {
32       return LFUConfiguration.class;
33    }
34 }
35
Popular Tags