Package org.apache.jackrabbit.core.util
Interface RepositoryLockMechanism
-
- All Known Implementing Classes:
CooperativeFileLock,RepositoryLock
public interface RepositoryLockMechanismExclusive lock on a repository home directory. This class encapsulates collective experience on how to acquire an exclusive lock on a given directory. The lock is expected to be exclusive both across process boundaries and within a single JVM.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidacquire()Lock the repository home.voidinit(String homeDir)Initialize the instance for the given directory path.voidrelease()Releases repository lock.
-
-
-
Method Detail
-
init
void init(String homeDir) throws RepositoryException
Initialize the instance for the given directory path. The lock still needs to be explicitly acquired using theacquire()method.- Parameters:
homeDir- directory path- Throws:
RepositoryException- if the canonical path of the directory can not be determined
-
acquire
void acquire() throws RepositoryExceptionLock the repository home.- Throws:
RepositoryException- if the repository lock can not be acquired
-
release
void release() throws RepositoryExceptionReleases repository lock.- Throws:
RepositoryException- if the repository lock can not be released
-
-