public class RedisLockUtil extends Object
| 构造器和说明 |
|---|
RedisLockUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
releaseLock(org.springframework.data.redis.core.StringRedisTemplate template,
String LOCK)
释放锁
|
static boolean |
tryLock(org.springframework.data.redis.core.StringRedisTemplate template,
String LOCK,
String Value,
int expires,
TimeUnit unit)
获取锁,阻塞直到成功
|
static boolean |
tryLockFailed(org.springframework.data.redis.core.StringRedisTemplate template,
String LOCK,
String Value)
获取锁,获取不到立即失败
|
static boolean |
tryLockFailed(org.springframework.data.redis.core.StringRedisTemplate template,
String LOCK,
String Value,
int expires,
TimeUnit unit)
获取锁,获取不到立即失败
|
public static boolean tryLock(org.springframework.data.redis.core.StringRedisTemplate template,
String LOCK,
String Value,
int expires,
TimeUnit unit)
public static boolean tryLockFailed(org.springframework.data.redis.core.StringRedisTemplate template,
String LOCK,
String Value,
int expires,
TimeUnit unit)
public static boolean tryLockFailed(org.springframework.data.redis.core.StringRedisTemplate template,
String LOCK,
String Value)
public static boolean releaseLock(org.springframework.data.redis.core.StringRedisTemplate template,
String LOCK)
Copyright © 2019. All rights reserved.