...
|
...
|
@@ -23,9 +23,7 @@ public class RedisLock { |
|
|
public boolean acquire(RedisKeyBuilder key, String value, final long timeout, final TimeUnit unit) {
|
|
|
try {
|
|
|
String redisLockValue = valueOperations.get(key);
|
|
|
if (value.equals(redisLockValue)) {
|
|
|
return true;
|
|
|
} else if (StringUtils.isNoneBlank(redisLockValue)) {
|
|
|
if (StringUtils.isNoneBlank(redisLockValue)) {
|
|
|
return false;
|
|
|
}
|
|
|
valueOperations.set(key, value, timeout, unit);
|
...
|
...
|
|