public abstract class DistributedLock extends AbstractDLock
| 构造器和说明 |
|---|
DistributedLock() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract boolean |
doLock(Object value,
long ttl,
TimeUnit ttlUnit) |
protected abstract String |
getKey() |
protected abstract Object |
getValue() |
protected abstract void |
setValue(Object value) |
boolean |
tryLock(long tryTime,
TimeUnit tryUnit,
long ttl,
TimeUnit ttlUnit,
boolean interruptibly) |
lock, lock, lockInterruptibly, newCondition, tryLock, tryLock, tryLock, unlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforceUnlockpublic boolean tryLock(long tryTime,
TimeUnit tryUnit,
long ttl,
TimeUnit ttlUnit,
boolean interruptibly)
throws InterruptedException
tryLock 在接口中 DLocktryLock 在类中 AbstractDLockInterruptedExceptionprotected abstract String getKey()
protected abstract Object getValue()
protected abstract void setValue(Object value)
Copyright © 2022. All rights reserved.