@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 对象
|
RedisLockReleaseStatus |
getReleaseStatus()
获取 释放 状态
|
RedisLockStatus |
getStatus()
获取所的状态
|
void |
setReleaseStatus(RedisLockReleaseStatus releaseStatus)
设置 release 状态
|
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
debugMessage, errorMessage, getDecoratorByClass, getKey, getLockClient, getLockSeconds, getSleepMaxMills, getSleepMinMills, getSpinTimes, infoMessage, interrupted, isFinished, needUnlock, setKey, setLockSeconds, 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 在类中 AbsLockDecoratorInterruptedExceptionpublic RedisLockReleaseStatus getReleaseStatus()
ILockgetReleaseStatus 在接口中 ILockgetReleaseStatus 在类中 AbsLockDecoratorpublic void setReleaseStatus(RedisLockReleaseStatus releaseStatus)
ILockWritablesetReleaseStatus 在接口中 ILockWritablesetReleaseStatus 在类中 AbsLockDecoratorreleaseStatus - 释放状态protected org.slf4j.Logger getLogger()
AbsLockDecoratorgetLogger 在类中 AbsLockDecoratorpublic void unlock()
unlock 在接口中 Lockunlock 在类中 AbsLockDecoratorpublic RedisLockStatus getStatus()
ILockgetStatus 在接口中 ILockgetStatus 在接口中 ILockWritablegetStatus 在类中 AbsLockDecoratorCopyright © 2020. All rights reserved.