public class SQLLockManager extends BasicLockManager
| Constructor and Description |
|---|
SQLLockManager() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acquireLock(String lockName)
Actually obtains a lock and returns immediatelly.
|
protected int |
getInitialWait()
If the lock is already aquired, this returns the initial amount of milliseconds to wait.
|
List<LockInfo> |
getLocks()
Returns the list of known locks.
|
protected int |
getMaxWait()
Returns the maximal interval in millis which is spent until a new attempt is made to acquire a lock.
|
String |
getName() |
protected int |
getWaitIncrement()
If the lock is still acquired, this returns the amount of milliseconds to increase the wait interval.
|
boolean |
isLocked(String lock)
Determines if the lock is currently being locked.
|
void |
unlock(String lock,
boolean force)
Unlocks the given lock.
|
tryLockprotected int getMaxWait()
BasicLockManagergetMaxWait in class BasicLockManagerprotected int getWaitIncrement()
BasicLockManagergetWaitIncrement in class BasicLockManagerprotected int getInitialWait()
BasicLockManagergetInitialWait in class BasicLockManagerprotected boolean acquireLock(@Nonnull String lockName)
BasicLockManageracquireLock in class BasicLockManagerlockName - the name of the lock to acquire.public boolean isLocked(@Nonnull String lock)
LockManagerlock - the name of the lock to checkpublic void unlock(String lock, boolean force)
LockManagerlock - the name of the lockforce - true if the lock should be removed, even if it is acquired by another nodepublic List<LockInfo> getLocks()
LockManagerCopyright © 2018. All rights reserved.