public class DefaultRedisLock extends Object implements IRedisLock, ILockWritable
默认的具体Redis锁实现类
DEFAULT_LOCK_SECONDS, DEFAULT_SLEEP_MAX_MILLS, DEFAULT_SLEEP_MIN_MILLS, DEFAULT_SPIN_TIME| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
debugMessage(String message)
来一个 debug 消息
|
RedisLockClient |
getLockClient()
获取 锁的客户端
|
boolean |
interrupted()
取消当前锁,只对 NEW 状态可用
|
boolean |
needUnlock()
是否需要解锁
|
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, execute, getKey, getLockSeconds, getReleaseStatus, getSleepMaxMills, getSleepMinMills, getSpinTimes, getStatus, isFinished, isLocked, isRollback, lock, lockInterruptibly, newConditionexecute, execute, execute, execute, executegetLockSeconds, getSleepMaxMills, getSleepMills, getSleepMinMills, getSpinTimes, getStatus, inStates, isStatus, setKey, setLockSeconds, setReleaseStatus, setSleepMaxMills, setSleepMinMills, setSpinTimes, setStatus, unlockedpublic boolean interrupted()
ILockinterrupted 在接口中 ILockpublic boolean needUnlock()
ILockWritableneedUnlock 在接口中 ILockWritablepublic RedisLockClient getLockClient()
ILockWritablegetLockClient 在接口中 ILockWritablepublic boolean tryLock(long time,
TimeUnit unit)
throws InterruptedException
tryLock 在接口中 LockInterruptedExceptionprotected void debugMessage(String message)
message - 消息Copyright © 2020. All rights reserved.