cn.lingyangwl.framework.lock.manager.RedissonManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lock-spring-boot-starter Show documentation
Show all versions of lock-spring-boot-starter Show documentation
lingyang framework 适用所有java项目的公共库, 方便快速集成和使用, 提供工作效率
The newest version!
package cn.lingyangwl.framework.lock.manager;
import cn.lingyangwl.framework.lock.model.ILock;
import cn.lingyangwl.framework.lock.model.RedissonLock;
import org.redisson.Redisson;
/**
* @author shenguangyang
*/
public class RedissonManager implements ILockManager {
private final Redisson redisson;
public RedissonManager(Redisson redisson) {
this.redisson = redisson;
}
@Override
public ILock getLock(String lockKey) {
return new RedissonLock(lockKey, redisson);
}
}