KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Most Recently Used Policy.
11  * <p/>
12  * This algorithm will evict the most recently used cache entries from cache.
13  *
14  * @author Daniel Huang (dhuang@jboss.org)
15  * @version $Revision: 1.1 $
16  */

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