001package org.apache.archiva.configuration; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022/** 023 * File Locking configuration. 024 * 025 * @version $Revision$ $Date$ 026 */ 027@SuppressWarnings( "all" ) 028public class FileLockConfiguration 029 implements java.io.Serializable 030{ 031 032 //--------------------------/ 033 //- Class/Member Variables -/ 034 //--------------------------/ 035 036 /** 037 * skipping the locking mechanism. 038 */ 039 private boolean skipLocking = true; 040 041 /** 042 * maximum time to wait to get the file lock (0 infinite). 043 */ 044 private int lockingTimeout = 0; 045 046 047 //-----------/ 048 //- Methods -/ 049 //-----------/ 050 051 /** 052 * Get maximum time to wait to get the file lock (0 infinite). 053 * 054 * @return int 055 */ 056 public int getLockingTimeout() 057 { 058 return this.lockingTimeout; 059 } //-- int getLockingTimeout() 060 061 /** 062 * Get skipping the locking mechanism. 063 * 064 * @return boolean 065 */ 066 public boolean isSkipLocking() 067 { 068 return this.skipLocking; 069 } //-- boolean isSkipLocking() 070 071 /** 072 * Set maximum time to wait to get the file lock (0 infinite). 073 * 074 * @param lockingTimeout 075 */ 076 public void setLockingTimeout( int lockingTimeout ) 077 { 078 this.lockingTimeout = lockingTimeout; 079 } //-- void setLockingTimeout( int ) 080 081 /** 082 * Set skipping the locking mechanism. 083 * 084 * @param skipLocking 085 */ 086 public void setSkipLocking( boolean skipLocking ) 087 { 088 this.skipLocking = skipLocking; 089 } //-- void setSkipLocking( boolean ) 090 091}