1 package org.apache.commons.jcs.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(String key, boolean eternal, String createTime,
56 long maxLifeSeconds, long expiresInSeconds)
57 {
58 super();
59 this.key = key;
60 this.eternal = eternal;
61 this.createTime = createTime;
62 this.maxLifeSeconds = maxLifeSeconds;
63 this.expiresInSeconds = expiresInSeconds;
64 }
65
66
67
68
69 public String getKey()
70 {
71 return this.key;
72 }
73
74
75
76
77 public boolean isEternal()
78 {
79 return this.eternal;
80 }
81
82
83
84
85 public String getCreateTime()
86 {
87 return this.createTime;
88 }
89
90
91
92
93
94 public long getMaxLifeSeconds()
95 {
96 return this.maxLifeSeconds;
97 }
98
99
100
101
102
103 public long getExpiresInSeconds()
104 {
105 return this.expiresInSeconds;
106 }
107
108
109
110
111 @Override
112 public String toString()
113 {
114 StringBuilder buf = new StringBuilder();
115 buf.append( "\nCacheElementInfo " );
116 buf.append( "\n Key [" ).append( getKey() ).append( "]" );
117 buf.append( "\n Eternal [" ).append( isEternal() ).append( "]" );
118 buf.append( "\n CreateTime [" ).append( getCreateTime() ).append( "]" );
119 buf.append( "\n MaxLifeSeconds [" ).append( getMaxLifeSeconds() ).append( "]" );
120 buf.append( "\n ExpiresInSeconds [" ).append( getExpiresInSeconds() ).append( "]" );
121
122 return buf.toString();
123 }
124 }