KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Eviction policy based on the FIFO algorithm where users can specify the max
11  * number of nodes.
12  *
13  * @author Daniel Huang (dhuang@jboss.org)
14  * @author Morten Kvistgaard
15  * @version $Revision: 1.3 $
16  */

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