cn.lingyangwl.framework.lock.manager.CuratorManager 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.CuratorLock;
import cn.lingyangwl.framework.lock.model.ILock;
import org.apache.curator.framework.CuratorFramework;
/**
* @author shenguangyang
*/
public class CuratorManager implements ILockManager {
private final CuratorFramework curatorFramework;
public CuratorManager(CuratorFramework curatorFramework) {
this.curatorFramework = curatorFramework;
}
@Override
public ILock getLock(String lockKey) {
return new CuratorLock(lockKey, curatorFramework);
}
}