@Service @Transactional(propagation=NOT_SUPPORTED) public class LockServiceImpl extends Object implements LockService
| Constructor and Description |
|---|
LockServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireLock()
Attempts to acquire the cluster's lock
|
boolean |
eagerAcquire()
Releases expired locks and afterwards attempts to refresh
its own lock or acquire the lock.
|
Date |
getLockExpireDate()
Returns the locks expire date or
null if no cluster is not locked. |
String |
getLockOwner()
Returns the cluster's lock owner.
|
boolean |
isOwnLock() |
boolean |
refreshOwnLock()
Attempts to refresh the owned lock.
|
boolean |
releaseExpiredLock()
Attempt to release the cluster's lock if it has expired.
|
boolean |
releaseOwnLock()
Releases the owned lock.
|
public boolean eagerAcquire()
LockServiceeagerAcquire in interface LockServicepublic boolean acquireLock()
LockServiceacquireLock in interface LockServicepublic boolean isOwnLock()
isOwnLock in interface LockServicepublic boolean refreshOwnLock()
LockServicerefreshOwnLock in interface LockServicepublic boolean releaseOwnLock()
LockServicereleaseOwnLock in interface LockServicepublic boolean releaseExpiredLock()
LockServicereleaseExpiredLock in interface LockServicepublic String getLockOwner()
LockServicegetLockOwner in interface LockServicepublic Date getLockExpireDate()
LockServicenull if no cluster is not locked.getLockExpireDate in interface LockServicenull if no cluster is not locked.Copyright © 2018. All rights reserved.