1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| package org.jboss.cache.eviction; |
9 |
| |
10 |
| import org.jboss.cache.CacheSPI; |
11 |
| import org.jboss.cache.RegionManager; |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| |
19 |
| |
20 |
| |
21 |
| public class LRUPolicy extends BaseEvictionPolicy implements EvictionPolicy |
22 |
| { |
23 |
| protected RegionManager regionManager_; |
24 |
| |
25 |
| protected EvictionAlgorithm algorithm; |
26 |
| |
27 |
4032
| public LRUPolicy()
|
28 |
| { |
29 |
4032
| super();
|
30 |
4032
| algorithm = new LRUAlgorithm();
|
31 |
| } |
32 |
| |
33 |
775
| public EvictionAlgorithm getEvictionAlgorithm()
|
34 |
| { |
35 |
775
| return algorithm;
|
36 |
| } |
37 |
| |
38 |
2972
| public Class<LRUConfiguration> getEvictionConfigurationClass()
|
39 |
| { |
40 |
2972
| return LRUConfiguration.class;
|
41 |
| } |
42 |
| |
43 |
1060
| public void setCache(CacheSPI cache)
|
44 |
| { |
45 |
1060
| super.setCache(cache);
|
46 |
1060
| regionManager_ = cache_.getRegionManager();
|
47 |
| } |
48 |
| } |