|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.util.RepositoryLock
public class RepositoryLock
Exclusive 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. The lock mechanism must also work consistently on a variety of operating systems and JVM implementations.
https://issues.apache.org/jira/browse/JCR-213
,
https://issues.apache.org/jira/browse/JCR-233
,
https://issues.apache.org/jira/browse/JCR-254
,
https://issues.apache.org/jira/browse/JCR-912
,
https://issues.apache.org/jira/browse/JCR-933
Constructor Summary | |
---|---|
RepositoryLock()
|
|
RepositoryLock(String path)
Deprecated. This constructor is deprecated; use the default constructor and init(String) instead. |
Method Summary | |
---|---|
void |
acquire()
Lock the repository home. |
void |
init(String path)
Initialize the instance for the given directory path. |
void |
release()
Releases repository lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepositoryLock()
public RepositoryLock(String path) throws RepositoryException
init(String)
instead.
path
- directory path
RepositoryException
- if the canonical path of the directory
can not be determinedMethod Detail |
---|
public void init(String path) throws RepositoryException
acquire()
method.
init
in interface RepositoryLockMechanism
path
- directory path
RepositoryException
- if the canonical path of the directory
can not be determinedpublic void acquire() throws RepositoryException
acquire
in interface RepositoryLockMechanism
RepositoryException
- if the repository lock can not be acquiredpublic void release()
release
in interface RepositoryLockMechanism
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |