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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. package org.apache.archiva.configuration.model;
  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. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. /**
  20. * File Locking configuration.
  21. *
  22. * @version $Revision$ $Date$
  23. */
  24. @SuppressWarnings( "all" )
  25. public class FileLockConfiguration
  26. implements java.io.Serializable
  27. {
  28. //--------------------------/
  29. //- Class/Member Variables -/
  30. //--------------------------/
  31. /**
  32. * skipping the locking mechanism.
  33. */
  34. private boolean skipLocking = true;
  35. /**
  36. * maximum time to wait to get the file lock (0 infinite).
  37. */
  38. private int lockingTimeout = 0;
  39. //-----------/
  40. //- Methods -/
  41. //-----------/
  42. /**
  43. * Get maximum time to wait to get the file lock (0 infinite).
  44. *
  45. * @return int
  46. */
  47. public int getLockingTimeout()
  48. {
  49. return this.lockingTimeout;
  50. } //-- int getLockingTimeout()
  51. /**
  52. * Get skipping the locking mechanism.
  53. *
  54. * @return boolean
  55. */
  56. public boolean isSkipLocking()
  57. {
  58. return this.skipLocking;
  59. } //-- boolean isSkipLocking()
  60. /**
  61. * Set maximum time to wait to get the file lock (0 infinite).
  62. *
  63. * @param lockingTimeout
  64. */
  65. public void setLockingTimeout( int lockingTimeout )
  66. {
  67. this.lockingTimeout = lockingTimeout;
  68. } //-- void setLockingTimeout( int )
  69. /**
  70. * Set skipping the locking mechanism.
  71. *
  72. * @param skipLocking
  73. */
  74. public void setSkipLocking( boolean skipLocking )
  75. {
  76. this.skipLocking = skipLocking;
  77. } //-- void setSkipLocking( boolean )
  78. }