Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CacheInfo |
|
| 1.0;1 |
1 | 0 | /** |
2 | * 2009, Digitalis Informatica. All rights reserved. Distribuicao e Gestao de Informatica, Lda. Estrada de Paco de Arcos | |
3 | * num.9 - Piso -1 2780-666 Paco de Arcos Telefone: (351) 21 4408990 Fax: (351) 21 4408999 http://www.digitalis.pt | |
4 | */ | |
5 | ||
6 | package pt.digitalis.dif.utils.cache; | |
7 | ||
8 | /** | |
9 | * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a><br/> | |
10 | * @created 16 de Mar de 2011 | |
11 | */ | |
12 | public class CacheInfo { | |
13 | ||
14 | /** Cache life time in seconds */ | |
15 | private long durationInSeconds; | |
16 | ||
17 | /** the cache scope */ | |
18 | private CacheScope scope; | |
19 | ||
20 | /** | |
21 | * @param durationInSeconds | |
22 | * @param scope | |
23 | */ | |
24 | public CacheInfo(CacheScope scope, long durationInSeconds) | |
25 | { | |
26 | 0 | super(); |
27 | 0 | this.durationInSeconds = durationInSeconds; |
28 | 0 | this.scope = scope; |
29 | 0 | } |
30 | ||
31 | /** | |
32 | * Inspector for the 'durationInSeconds' attribute. | |
33 | * | |
34 | * @return the durationInSeconds value | |
35 | */ | |
36 | protected long getDurationInSeconds() | |
37 | { | |
38 | 0 | return durationInSeconds; |
39 | } | |
40 | ||
41 | /** | |
42 | * Inspector for the 'scope' attribute. | |
43 | * | |
44 | * @return the scope value | |
45 | */ | |
46 | protected CacheScope getScope() | |
47 | { | |
48 | 0 | return scope; |
49 | } | |
50 | ||
51 | /** | |
52 | * Modifier for the 'durationInSeconds' attribute. | |
53 | * | |
54 | * @param durationInSeconds | |
55 | * the new durationInSeconds value to set | |
56 | */ | |
57 | protected void setDurationInSeconds(long durationInSeconds) | |
58 | { | |
59 | 0 | this.durationInSeconds = durationInSeconds; |
60 | 0 | } |
61 | ||
62 | /** | |
63 | * Modifier for the 'scope' attribute. | |
64 | * | |
65 | * @param scope | |
66 | * the new scope value to set | |
67 | */ | |
68 | protected void setScope(CacheScope scope) | |
69 | { | |
70 | 0 | this.scope = scope; |
71 | 0 | } |
72 | } |