This project has retired. For details please refer to its Attic page.
CacheConfiguration xref
View Javadoc
1   package org.apache.archiva.admin.model.beans;
2   /*
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   * http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   */
20  
21  import javax.xml.bind.annotation.XmlRootElement;
22  import java.io.Serializable;
23  
24  /**
25   * @author Olivier Lamy
26   * @since 1.4-M4
27   */
28  @XmlRootElement( name = "cacheConfiguration" )
29  public class CacheConfiguration
30      implements Serializable
31  {
32      /**
33       * TimeToIdleSeconds.
34       */
35      private int timeToIdleSeconds = -1;
36  
37      /**
38       * TimeToLiveSeconds.
39       */
40      private int timeToLiveSeconds = -1;
41  
42      /**
43       * max elements in memory.
44       */
45      private int maxElementsInMemory = -1;
46  
47      /**
48       * max elements on disk.
49       */
50      private int maxElementsOnDisk = -1;
51  
52      public CacheConfiguration()
53      {
54          // no op
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 }