1 package org.apache.archiva.admin.model.beans;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.io.Serializable;
23
24
25
26
27
28 @XmlRootElement( name = "cacheConfiguration" )
29 public class CacheConfiguration
30 implements Serializable
31 {
32
33
34
35 private int timeToIdleSeconds = -1;
36
37
38
39
40 private int timeToLiveSeconds = -1;
41
42
43
44
45 private int maxElementsInMemory = -1;
46
47
48
49
50 private int maxElementsOnDisk = -1;
51
52 public CacheConfiguration()
53 {
54
55 }
56
57 public int getTimeToIdleSeconds()
58 {
59 return timeToIdleSeconds;
60 }
61
62 public void setTimeToIdleSeconds( int timeToIdleSeconds )
63 {
64 this.timeToIdleSeconds = timeToIdleSeconds;
65 }
66
67 public int getTimeToLiveSeconds()
68 {
69 return timeToLiveSeconds;
70 }
71
72 public void setTimeToLiveSeconds( int timeToLiveSeconds )
73 {
74 this.timeToLiveSeconds = timeToLiveSeconds;
75 }
76
77 public int getMaxElementsInMemory()
78 {
79 return maxElementsInMemory;
80 }
81
82 public void setMaxElementsInMemory( int maxElementsInMemory )
83 {
84 this.maxElementsInMemory = maxElementsInMemory;
85 }
86
87 public int getMaxElementsOnDisk()
88 {
89 return maxElementsOnDisk;
90 }
91
92 public void setMaxElementsOnDisk( int maxElementsOnDisk )
93 {
94 this.maxElementsOnDisk = maxElementsOnDisk;
95 }
96
97 @Override
98 public String toString()
99 {
100 final StringBuilder sb = new StringBuilder();
101 sb.append( "CacheConfiguration" );
102 sb.append( "{timeToIdleSeconds=" ).append( timeToIdleSeconds );
103 sb.append( ", timeToLiveSeconds=" ).append( timeToLiveSeconds );
104 sb.append( ", maxElementsInMemory=" ).append( maxElementsInMemory );
105 sb.append( ", maxElementsOnDisk=" ).append( maxElementsOnDisk );
106 sb.append( '}' );
107 return sb.toString();
108 }
109 }