public class LockUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
String |
serviceUUid |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
delayDistributedLock(Object obj,
Long exptime,
TimeUnit timeUnit) |
boolean |
DistributedLock(Object lockObj,
Boolean isAgress)
带看门狗机制上锁
|
boolean |
DistributedLock(Object obj,
Long exptime,
TimeUnit timeUnit,
Boolean isDelay,
Boolean isAgress) |
Long |
DistributedUnLock(Object obj) |
Long |
DistributedUnLock(Object obj,
Thread thread) |
static LockUtil |
getInstance() |
static ConcurrentHashMap<Long,ScheduledFuture> |
getThreadWatchDog() |
Boolean |
luaToRedisByDelay(String lockName,
Long expTimeInc,
TimeUnit timeUnit) |
Long |
luaToRedisByLock(String lockName,
Long expTime,
TimeUnit timeUnit,
String[] hashkey) |
Long |
luaToRedisByUnLock(String lockName,
Thread thread) |
public String serviceUUid
public boolean DistributedLock(Object lockObj, Boolean isAgress)
lockObj - public Long luaToRedisByLock(String lockName, Long expTime, TimeUnit timeUnit, String[] hashkey)
public Boolean luaToRedisByDelay(String lockName, Long expTimeInc, TimeUnit timeUnit)
public boolean DistributedLock(Object obj, Long exptime, TimeUnit timeUnit, Boolean isDelay, Boolean isAgress) throws KaToolException
obj - exptime - timeUnit - KaToolExceptionpublic static ConcurrentHashMap<Long,ScheduledFuture> getThreadWatchDog()
public boolean delayDistributedLock(Object obj, Long exptime, TimeUnit timeUnit) throws KaToolException
KaToolExceptionpublic Long DistributedUnLock(Object obj) throws KaToolException
KaToolExceptionpublic Long DistributedUnLock(Object obj, Thread thread) throws KaToolException
KaToolExceptionpublic static LockUtil getInstance()
Copyright © 2024. All rights reserved.