1 |
| package org.jboss.cache.eviction; |
2 |
| |
3 |
| import org.jboss.cache.config.Dynamic; |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| public class ExpirationConfiguration extends EvictionPolicyConfigBase |
9 |
| { |
10 |
| |
11 |
| private static final long serialVersionUID = 47338798734219507L; |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| public static final String EXPIRATION_KEY = "expiration"; |
17 |
| |
18 |
| |
19 |
| |
20 |
| |
21 |
| @Dynamic |
22 |
| private String expirationKeyName = EXPIRATION_KEY; |
23 |
| |
24 |
| @Dynamic |
25 |
| private boolean warnNoExpirationKey = true; |
26 |
| |
27 |
| @Dynamic |
28 |
| private int timeToLiveSeconds = 0; |
29 |
| |
30 |
4
| public ExpirationConfiguration()
|
31 |
| { |
32 |
4
| super();
|
33 |
| } |
34 |
| |
35 |
4
| @Override
|
36 |
| protected void setEvictionPolicyClassName() |
37 |
| { |
38 |
4
| setEvictionPolicyClass(ExpirationPolicy.class.getName());
|
39 |
| } |
40 |
| |
41 |
| |
42 |
| |
43 |
| |
44 |
| |
45 |
32
| public String getExpirationKeyName()
|
46 |
| { |
47 |
32
| return expirationKeyName;
|
48 |
| } |
49 |
| |
50 |
| |
51 |
| |
52 |
| |
53 |
0
| public void setExpirationKeyName(String expirationKeyName)
|
54 |
| { |
55 |
0
| this.expirationKeyName = expirationKeyName;
|
56 |
| } |
57 |
| |
58 |
| |
59 |
| |
60 |
| |
61 |
1
| public boolean getWarnNoExpirationKey()
|
62 |
| { |
63 |
1
| return warnNoExpirationKey;
|
64 |
| } |
65 |
| |
66 |
| |
67 |
| |
68 |
| |
69 |
0
| public void setWarnNoExpirationKey(boolean warnNoExpirationKey)
|
70 |
| { |
71 |
0
| this.warnNoExpirationKey = warnNoExpirationKey;
|
72 |
| } |
73 |
| |
74 |
0
| public int getTimeToLiveSeconds()
|
75 |
| { |
76 |
0
| return timeToLiveSeconds;
|
77 |
| } |
78 |
| |
79 |
0
| public void setTimeToLiveSeconds(int timeToLiveSeconds)
|
80 |
| { |
81 |
0
| this.timeToLiveSeconds = timeToLiveSeconds;
|
82 |
| } |
83 |
| |
84 |
| } |