public class DirectoryLockManager extends Object implements LockManager
| Constructor and Description |
|---|
DirectoryLockManager(File dir) |
| Modifier and Type | Method and Description |
|---|---|
String |
getLocation()
Technical description of where the lock is located, such as a URL.
|
boolean |
isLocked()
Determines if the directory is locked.
|
Lock |
lockOrFail()
Creates a lock in a directory if it does not yet exist.
|
boolean |
revokeLock()
Revokes a lock owned by another process.
|
Lock |
tryLock()
Creates a lock in a directory if it does not yet exist.
|
public DirectoryLockManager(File dir)
public String getLocation()
LockManagergetLocation in interface LockManagerpublic boolean isLocked()
isLocked in interface LockManagertrue if the directory is already locked.public Lock tryLock()
tryLock in interface LockManagerpublic Lock lockOrFail() throws SailLockedException
lockOrFail in interface LockManagerSailLockedException - if the directory is already locked.public boolean revokeLock()
revokeLock in interface LockManagertrue if a lock was successfully revoked.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.