public class RedisLock extends Object
RedisLock(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate)
String
getLockValue(long expireTime)
boolean
lock(String key, String lockValue)
lock(String key, String lockValue, Integer lockSeconds)
void
unlock(String key, String lockValue)
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public RedisLock(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate)
public boolean lock(String key, String lockValue)
key
lockValue
public boolean lock(String key, String lockValue, Integer lockSeconds)
lockSeconds
public void unlock(String key, String lockValue)
public String getLockValue(long expireTime)
expireTime
Copyright © 2021. All rights reserved.