public class CooperativeFileLock extends Object implements RepositoryLockMechanism
Constructor and Description |
---|
CooperativeFileLock() |
Modifier and Type | Method and Description |
---|---|
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.
|
public void init(String path)
init
in interface RepositoryLockMechanism
path
- basic path to append FILE_NAME
to.public void acquire() throws RepositoryException
acquire
in interface RepositoryLockMechanism
RepositoryException
- if locking was not successfulpublic void release()
release
in interface RepositoryLockMechanism
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.