public class DatabaseLockManager extends Object implements LockManager
| Constructor and Description |
|---|
DatabaseLockManager(DataSource ds) |
DatabaseLockManager(DataSource ds,
String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
String |
getLocation()
Technical description of where the lock is located, such as a URL.
|
boolean |
isDebugEnabled() |
boolean |
isLocked()
Determines if the SAIL is locked.
|
Lock |
lockOrFail()
Creates a lock in a SAIL if it does not yet exist.
|
boolean |
revokeLock()
Revokes a lock owned by another process.
|
Lock |
tryLock()
Creates a lock in a SAIL if it does not yet exist.
|
public DatabaseLockManager(DataSource ds)
public DatabaseLockManager(DataSource ds, String user, String password)
public String getLocation()
LockManagergetLocation in interface LockManagerpublic boolean isDebugEnabled()
public boolean isLocked()
LockManagerisLocked in interface LockManagertrue if the SAIL is already locked.public Lock tryLock()
LockManagertryLock in interface LockManagerpublic Lock lockOrFail() throws SailLockedException
LockManagerlockOrFail in interface LockManagerSailLockedException - if the directory is already locked.public boolean revokeLock()
revokeLock in interface LockManagertrue if a lock was successfully revoked.Copyright © 2001–2015 Aduna. All rights reserved.