| Modifier and Type | Method and Description |
|---|---|
Object |
getLockOwnership(RaftGroupId groupId,
String name)
Returns current lock ownership status of the given FencedLock instance.
|
Object |
lock(RaftGroupId groupId,
String name,
long sessionId,
long threadId,
UUID invocationUid)
Acquires the given FencedLock on the given CP group.
|
Object |
tryLock(RaftGroupId groupId,
String name,
long sessionId,
long threadId,
UUID invocationUid,
long timeoutMs)
Attempts to acquire the given FencedLock on the given CP group.
|
Object |
unlock(RaftGroupId groupId,
String name,
long sessionId,
long threadId,
UUID invocationUid)
Unlocks the given FencedLock on the given CP group.
|
Object lock(RaftGroupId groupId, String name, long sessionId, long threadId, UUID invocationUid)
LockOwnershipLostException.groupId - CP group id of this FencedLock instancename - Name of this FencedLock instancesessionId - Session ID of the callerthreadId - ID of the caller threadinvocationUid - UID of this invocationObject tryLock(RaftGroupId groupId, String name, long sessionId, long threadId, UUID invocationUid, long timeoutMs)
LockOwnershipLostException.groupId - CP group id of this FencedLock instancename - Name of this FencedLock instancesessionId - Session ID of the callerthreadId - ID of the caller threadinvocationUid - UID of this invocationtimeoutMs - Duration to wait for lock acquireObject unlock(RaftGroupId groupId, String name, long sessionId, long threadId, UUID invocationUid)
IllegalMonitorStateException.
If the session is closed while holding the lock, the call fails with
LockOwnershipLostException. Returns true if the lock is still
held by the caller after a successful unlock() call, false otherwise.groupId - CP group id of this FencedLock instancename - Name of this FencedLock instancesessionId - Session ID of the callerthreadId - ID of the caller threadinvocationUid - UID of this invocationObject getLockOwnership(RaftGroupId groupId, String name)
groupId - CP group id of this FencedLock instancename - Name of this FencedLock instanceCopyright © 2019. All Rights Reserved.