You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CacheConfiguration.java 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. package org.apache.archiva.configuration;
  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. * Cache configuration.
  22. *
  23. * @version $Revision$ $Date$
  24. */
  25. @SuppressWarnings( "all" )
  26. public class CacheConfiguration
  27. implements java.io.Serializable
  28. {
  29. //--------------------------/
  30. //- Class/Member Variables -/
  31. //--------------------------/
  32. /**
  33. * TimeToIdleSeconds.
  34. */
  35. private int timeToIdleSeconds = -1;
  36. /**
  37. * TimeToLiveSeconds.
  38. */
  39. private int timeToLiveSeconds = -1;
  40. /**
  41. * max elements in memory.
  42. */
  43. private int maxElementsInMemory = -1;
  44. /**
  45. * max elements on disk.
  46. */
  47. private int maxElementsOnDisk = -1;
  48. //-----------/
  49. //- Methods -/
  50. //-----------/
  51. /**
  52. * Get max elements in memory.
  53. *
  54. * @return int
  55. */
  56. public int getMaxElementsInMemory()
  57. {
  58. return this.maxElementsInMemory;
  59. } //-- int getMaxElementsInMemory()
  60. /**
  61. * Get max elements on disk.
  62. *
  63. * @return int
  64. */
  65. public int getMaxElementsOnDisk()
  66. {
  67. return this.maxElementsOnDisk;
  68. } //-- int getMaxElementsOnDisk()
  69. /**
  70. * Get timeToIdleSeconds.
  71. *
  72. * @return int
  73. */
  74. public int getTimeToIdleSeconds()
  75. {
  76. return this.timeToIdleSeconds;
  77. } //-- int getTimeToIdleSeconds()
  78. /**
  79. * Get timeToLiveSeconds.
  80. *
  81. * @return int
  82. */
  83. public int getTimeToLiveSeconds()
  84. {
  85. return this.timeToLiveSeconds;
  86. } //-- int getTimeToLiveSeconds()
  87. /**
  88. * Set max elements in memory.
  89. *
  90. * @param maxElementsInMemory
  91. */
  92. public void setMaxElementsInMemory( int maxElementsInMemory )
  93. {
  94. this.maxElementsInMemory = maxElementsInMemory;
  95. } //-- void setMaxElementsInMemory( int )
  96. /**
  97. * Set max elements on disk.
  98. *
  99. * @param maxElementsOnDisk
  100. */
  101. public void setMaxElementsOnDisk( int maxElementsOnDisk )
  102. {
  103. this.maxElementsOnDisk = maxElementsOnDisk;
  104. } //-- void setMaxElementsOnDisk( int )
  105. /**
  106. * Set timeToIdleSeconds.
  107. *
  108. * @param timeToIdleSeconds
  109. */
  110. public void setTimeToIdleSeconds( int timeToIdleSeconds )
  111. {
  112. this.timeToIdleSeconds = timeToIdleSeconds;
  113. } //-- void setTimeToIdleSeconds( int )
  114. /**
  115. * Set timeToLiveSeconds.
  116. *
  117. * @param timeToLiveSeconds
  118. */
  119. public void setTimeToLiveSeconds( int timeToLiveSeconds )
  120. {
  121. this.timeToLiveSeconds = timeToLiveSeconds;
  122. } //-- void setTimeToLiveSeconds( int )
  123. }