public interface LockService
All operations are implemented atomically such that they are safe for concurrent usage from different JVM's.
The service is intended as a mean to determine the cluster's master node.
| 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.
|
boolean eagerAcquire()
boolean acquireLock()
boolean isOwnLock()
boolean refreshOwnLock()
boolean releaseOwnLock()
boolean releaseExpiredLock()
String getLockOwner()
Date getLockExpireDate()
null if no cluster is not locked.null if no cluster is not locked.Copyright © 2018. All rights reserved.