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.

FileLockConfiguration.java 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. * File Locking configuration.
  22. *
  23. * @version $Revision$ $Date$
  24. */
  25. @SuppressWarnings( "all" )
  26. public class FileLockConfiguration
  27. implements java.io.Serializable
  28. {
  29. //--------------------------/
  30. //- Class/Member Variables -/
  31. //--------------------------/
  32. /**
  33. * skipping the locking mechanism.
  34. */
  35. private boolean skipLocking = true;
  36. /**
  37. * maximum time to wait to get the file lock (0 infinite).
  38. */
  39. private int lockingTimeout = 0;
  40. //-----------/
  41. //- Methods -/
  42. //-----------/
  43. /**
  44. * Get maximum time to wait to get the file lock (0 infinite).
  45. *
  46. * @return int
  47. */
  48. public int getLockingTimeout()
  49. {
  50. return this.lockingTimeout;
  51. } //-- int getLockingTimeout()
  52. /**
  53. * Get skipping the locking mechanism.
  54. *
  55. * @return boolean
  56. */
  57. public boolean isSkipLocking()
  58. {
  59. return this.skipLocking;
  60. } //-- boolean isSkipLocking()
  61. /**
  62. * Set maximum time to wait to get the file lock (0 infinite).
  63. *
  64. * @param lockingTimeout
  65. */
  66. public void setLockingTimeout( int lockingTimeout )
  67. {
  68. this.lockingTimeout = lockingTimeout;
  69. } //-- void setLockingTimeout( int )
  70. /**
  71. * Set skipping the locking mechanism.
  72. *
  73. * @param skipLocking
  74. */
  75. public void setSkipLocking( boolean skipLocking )
  76. {
  77. this.skipLocking = skipLocking;
  78. } //-- void setSkipLocking( boolean )
  79. }