All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.lingyangwl.framework.lock.manager.CuratorManager Maven / Gradle / Ivy

Go to download

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy