Package org.ametys.runtime.data
Class AmetysHomeLock
- java.lang.Object
-
- org.ametys.runtime.data.AmetysHomeLock
-
public class AmetysHomeLock extends Object
Exclusive lock on the Ametys Home directory. Based on the Jackrabbit repository lock.
-
-
Constructor Summary
Constructors Constructor Description AmetysHomeLock(File ametysHome)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acquire()
Lock the Ametys home directoryvoid
release()
Releases repository lock.
-
-
-
Constructor Detail
-
AmetysHomeLock
public AmetysHomeLock(File ametysHome) throws AmetysHomeLockException
Default constructor. Initialize the instance. The lock still needs to be explicitly acquired using theacquire()
method.- Parameters:
ametysHome
- The ametys home directory- Throws:
AmetysHomeLockException
- if the canonical path of the directory can not be determined
-
-
Method Detail
-
acquire
public void acquire() throws AmetysHomeLockException
Lock the Ametys home directory- Throws:
AmetysHomeLockException
- if the repository lock can not be acquired
-
release
public void release()
Releases repository lock.
-
-