1package org.apache.archiva.admin.model.beans;
2/*3 * Licensed to the Apache Software Foundation (ASF) under one4 * or more contributor license agreements. See the NOTICE file5 * distributed with this work for additional information6 * regarding copyright ownership. The ASF licenses this file7 * to you under the Apache License, Version 2.0 (the8 * "License"); you may not use this file except in compliance9 * with the License. You may obtain a copy of the License at10 *11 * http://www.apache.org/licenses/LICENSE-2.012 *13 * Unless required by applicable law or agreed to in writing,14 * software distributed under the License is distributed on an15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY16 * KIND, either express or implied. See the License for the17 * specific language governing permissions and limitations18 * under the License.19 */2021import javax.xml.bind.annotation.XmlRootElement;
22import java.io.Serializable;
2324/**25 * @author Olivier Lamy26 * @since 1.4-M427 */28 @XmlRootElement( name = "cacheConfiguration" )
29publicclassCacheConfiguration30implements Serializable
31 {
32/**33 * TimeToIdleSeconds.34 */35privateint timeToIdleSeconds = -1;
3637/**38 * TimeToLiveSeconds.39 */40privateint timeToLiveSeconds = -1;
4142/**43 * max elements in memory.44 */45privateint maxElementsInMemory = -1;
4647/**48 * max elements on disk.49 */50privateint maxElementsOnDisk = -1;
5152publicCacheConfiguration()
53 {
54// no op55 }
5657publicint getTimeToIdleSeconds()
58 {
59return timeToIdleSeconds;
60 }
6162publicvoid setTimeToIdleSeconds( int timeToIdleSeconds )
63 {
64this.timeToIdleSeconds = timeToIdleSeconds;
65 }
6667publicint getTimeToLiveSeconds()
68 {
69return timeToLiveSeconds;
70 }
7172publicvoid setTimeToLiveSeconds( int timeToLiveSeconds )
73 {
74this.timeToLiveSeconds = timeToLiveSeconds;
75 }
7677publicint getMaxElementsInMemory()
78 {
79return maxElementsInMemory;
80 }
8182publicvoid setMaxElementsInMemory( int maxElementsInMemory )
83 {
84this.maxElementsInMemory = maxElementsInMemory;
85 }
8687publicint getMaxElementsOnDisk()
88 {
89return maxElementsOnDisk;
90 }
9192publicvoid setMaxElementsOnDisk( int maxElementsOnDisk )
93 {
94this.maxElementsOnDisk = maxElementsOnDisk;
95 }
9697 @Override
98public String toString()
99 {
100final 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( '}' );
107return sb.toString();
108 }
109 }