public class NStoreNLock extends Object implements NLock
NLock implementation backed by an NLockStore.| Constructor and Description |
|---|
NStoreNLock(NLockStore store,
String lockId) |
NStoreNLock(NLockStore store,
String lockId,
String ownerId,
NDuration leaseDuration,
NDuration timeout,
NDuration retryInterval,
boolean autoRenew) |
| Modifier and Type | Method and Description |
|---|---|
NElement |
describe() |
boolean |
isHeldByCurrentThread() |
boolean |
isLocked() |
NDuration |
leaseDuration() |
void |
lock() |
String |
lockId() |
void |
lockInterruptibly() |
Condition |
newCondition() |
String |
ownerId() |
boolean |
renew(NDuration leaseDuration) |
NLockStore |
store() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcallWith, callWith, callWithImmediately, of, of, ofCompanion, ofCompanion, ofCompanion, ofCompanion, ofCompanion, ofCompanion, ofFile, ofFile, ofFile, ofId, ofIdPath, ofIdPath, ofPath, ofPathCompanion, ofResource, runWith, runWith, runWithImmediatelypublic NStoreNLock(NLockStore store, String lockId)
public NDuration leaseDuration()
leaseDuration in interface NLockpublic String ownerId()
public NLockStore store()
public boolean isHeldByCurrentThread()
isHeldByCurrentThread in interface NLockpublic void lockInterruptibly()
throws InterruptedException
lockInterruptibly in interface LockInterruptedExceptionpublic boolean tryLock(long time,
TimeUnit unit)
throws InterruptedException
tryLock in interface LockInterruptedExceptionpublic Condition newCondition()
newCondition in interface Lockpublic NElement describe()
describe in interface NDescribableCopyright © 2026 vpc open source initiative. All rights reserved.