|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.util.CooperativeFileLock
public class CooperativeFileLock
The file lock is used to ensure a resource is only open once at any time. It uses a cooperative locking protocol.
| Constructor Summary | |
|---|---|
CooperativeFileLock()
|
|
| Method Summary | |
|---|---|
void |
acquire()
Lock the directory if possible. |
void |
init(String path)
Create a new file locking object using the given file name. |
void |
release()
Unlock the directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CooperativeFileLock()
| Method Detail |
|---|
public void init(String path)
init in interface RepositoryLockMechanismpath - basic path to append FILE_NAME to.
public void acquire()
throws RepositoryException
acquire in interface RepositoryLockMechanismRepositoryException - if locking was not successfulpublic void release()
release in interface RepositoryLockMechanism
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||