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()
LockManager
getLocation
in interface LockManager
public boolean isDebugEnabled()
public boolean isLocked()
LockManager
isLocked
in interface LockManager
true
if the SAIL is already locked.public Lock tryLock()
LockManager
tryLock
in interface LockManager
public Lock lockOrFail() throws SailLockedException
LockManager
lockOrFail
in interface LockManager
SailLockedException
- if the directory is already locked.public boolean revokeLock()
revokeLock
in interface LockManager
true
if a lock was successfully revoked.Copyright © 2001-2016 Aduna. All Rights Reserved.