1 package org.apache.commons.jcs3.admin;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.beans.ConstructorProperties;
23
24
25
26
27
28 public class CacheElementInfo
29 {
30
31 private final String key;
32
33
34 private final boolean eternal;
35
36
37 private final String createTime;
38
39
40 private final long maxLifeSeconds;
41
42
43 private final long expiresInSeconds;
44
45
46
47
48
49
50
51
52
53
54 @ConstructorProperties({"key", "eternal", "createTime", "maxLifeSeconds", "expiresInSeconds"})
55 public CacheElementInfo(final String key, final boolean eternal, final String createTime,
56 final long maxLifeSeconds, final long expiresInSeconds)
57 {
58 this.key = key;
59 this.eternal = eternal;
60 this.createTime = createTime;
61 this.maxLifeSeconds = maxLifeSeconds;
62 this.expiresInSeconds = expiresInSeconds;
63 }
64
65
66
67
68 public String getKey()
69 {
70 return this.key;
71 }
72
73
74
75
76 public boolean isEternal()
77 {
78 return this.eternal;
79 }
80
81
82
83
84 public String getCreateTime()
85 {
86 return this.createTime;
87 }
88
89
90
91
92
93 public long getMaxLifeSeconds()
94 {
95 return this.maxLifeSeconds;
96 }
97
98
99
100
101
102 public long getExpiresInSeconds()
103 {
104 return this.expiresInSeconds;
105 }
106
107
108
109
110 @Override
111 public String toString()
112 {
113 final StringBuilder buf = new StringBuilder();
114 buf.append( "\nCacheElementInfo " );
115 buf.append( "\n Key [" ).append( getKey() ).append( "]" );
116 buf.append( "\n Eternal [" ).append( isEternal() ).append( "]" );
117 buf.append( "\n CreateTime [" ).append( getCreateTime() ).append( "]" );
118 buf.append( "\n MaxLifeSeconds [" ).append( getMaxLifeSeconds() ).append( "]" );
119 buf.append( "\n ExpiresInSeconds [" ).append( getExpiresInSeconds() ).append( "]" );
120
121 return buf.toString();
122 }
123 }