This project has retired. For details please refer to its Attic page.
CacheConfiguration xref
View Javadoc
1   package org.apache.archiva.configuration;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  /**
23   * Cache configuration.
24   * 
25   * @version $Revision$ $Date$
26   */
27  @SuppressWarnings( "all" )
28  public class CacheConfiguration
29      implements java.io.Serializable
30  {
31  
32        //--------------------------/
33       //- Class/Member Variables -/
34      //--------------------------/
35  
36      /**
37       * TimeToIdleSeconds.
38       */
39      private int timeToIdleSeconds = -1;
40  
41      /**
42       * TimeToLiveSeconds.
43       */
44      private int timeToLiveSeconds = -1;
45  
46      /**
47       * max elements in memory.
48       */
49      private int maxElementsInMemory = -1;
50  
51      /**
52       * max elements on disk.
53       */
54      private int maxElementsOnDisk = -1;
55  
56  
57        //-----------/
58       //- Methods -/
59      //-----------/
60  
61      /**
62       * Get max elements in memory.
63       * 
64       * @return int
65       */
66      public int getMaxElementsInMemory()
67      {
68          return this.maxElementsInMemory;
69      } //-- int getMaxElementsInMemory()
70  
71      /**
72       * Get max elements on disk.
73       * 
74       * @return int
75       */
76      public int getMaxElementsOnDisk()
77      {
78          return this.maxElementsOnDisk;
79      } //-- int getMaxElementsOnDisk()
80  
81      /**
82       * Get timeToIdleSeconds.
83       * 
84       * @return int
85       */
86      public int getTimeToIdleSeconds()
87      {
88          return this.timeToIdleSeconds;
89      } //-- int getTimeToIdleSeconds()
90  
91      /**
92       * Get timeToLiveSeconds.
93       * 
94       * @return int
95       */
96      public int getTimeToLiveSeconds()
97      {
98          return this.timeToLiveSeconds;
99      } //-- int getTimeToLiveSeconds()
100 
101     /**
102      * Set max elements in memory.
103      * 
104      * @param maxElementsInMemory
105      */
106     public void setMaxElementsInMemory( int maxElementsInMemory )
107     {
108         this.maxElementsInMemory = maxElementsInMemory;
109     } //-- void setMaxElementsInMemory( int )
110 
111     /**
112      * Set max elements on disk.
113      * 
114      * @param maxElementsOnDisk
115      */
116     public void setMaxElementsOnDisk( int maxElementsOnDisk )
117     {
118         this.maxElementsOnDisk = maxElementsOnDisk;
119     } //-- void setMaxElementsOnDisk( int )
120 
121     /**
122      * Set timeToIdleSeconds.
123      * 
124      * @param timeToIdleSeconds
125      */
126     public void setTimeToIdleSeconds( int timeToIdleSeconds )
127     {
128         this.timeToIdleSeconds = timeToIdleSeconds;
129     } //-- void setTimeToIdleSeconds( int )
130 
131     /**
132      * Set timeToLiveSeconds.
133      * 
134      * @param timeToLiveSeconds
135      */
136     public void setTimeToLiveSeconds( int timeToLiveSeconds )
137     {
138         this.timeToLiveSeconds = timeToLiveSeconds;
139     } //-- void setTimeToLiveSeconds( int )
140 
141 }