KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jboss.cache.eviction;
2
3 import org.jboss.cache.Fqn;
4
5 /**
6  * Returns the {@link ExpirationAlgorithm} as the policy's algorithm.
7  * @author rosse
8  */

9 public class ExpirationPolicy extends BaseEvictionPolicy
10 {
11    
12    private EvictionAlgorithm algorithm;
13    
14    public ExpirationPolicy() {
15       algorithm = new ExpirationAlgorithm(this);
16    }
17
18    public EvictionAlgorithm getEvictionAlgorithm()
19    {
20       return algorithm;
21    }
22
23    public Class JavaDoc getEvictionConfigurationClass()
24    {
25       return ExpirationConfiguration.class;
26    }
27
28    /**
29     * Returns true if it's a visit node event.
30     */

31    @Override JavaDoc
32    public boolean canIgnoreEvent(Fqn fqn, NodeEventType eventType) {
33       return (eventType == NodeEventType.VISIT_NODE_EVENT);
34    }
35 }
36
Popular Tags