@Order(value=1000) public class ReentrantLockDecorator extends AbsLockDecorator
delegate, ORDER_DEFAULTDEFAULT_LOCK_SECONDS, DEFAULT_SLEEP_MAX_MILLS, DEFAULT_SLEEP_MIN_MILLS, DEFAULT_SPIN_TIME| 构造器和说明 |
|---|
ReentrantLockDecorator(IRedisLock delegate)
构造一个 包装器实例
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected org.slf4j.Logger |
getLogger()
获取 logger 对象
|
RedisLockStatus |
getStatus()
获取所的状态
|
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
debugMessage, errorMessage, getDecoratorByClass, getKey, getLockSeconds, getReleaseStatus, getSleepMaxMills, getSleepMinMills, getSpinTimes, infoMessage, interrupted, isFinished, needUnlock, setKey, setLockSeconds, setReleaseStatus, setSleepMaxMills, setSleepMinMills, setSpinTimes, setStatus, unlockedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, execute, isLocked, isRollback, lock, lockInterruptibly, newConditionexecute, execute, execute, execute, executegetSleepMills, inStates, isStatuspublic ReentrantLockDecorator(IRedisLock delegate)
delegate - 实际执行者public boolean tryLock()
tryLock 在接口中 LocktryLock 在类中 AbsLockDecoratorpublic boolean tryLock(long time,
TimeUnit unit)
throws InterruptedException
tryLock 在接口中 LocktryLock 在类中 AbsLockDecoratorInterruptedExceptionprotected org.slf4j.Logger getLogger()
AbsLockDecoratorgetLogger 在类中 AbsLockDecoratorpublic void unlock()
unlock 在接口中 Lockunlock 在类中 AbsLockDecoratorpublic RedisLockStatus getStatus()
ILockgetStatus 在接口中 ILockgetStatus 在接口中 ILockWritablegetStatus 在类中 AbsLockDecoratorCopyright © 2020. All rights reserved.