forked from fanruan/finekit
Dylan.Liu
4 years ago
1 changed files with 33 additions and 0 deletions
@ -0,0 +1,33 @@
|
||||
package com.fanruan.api.cluster; |
||||
|
||||
import com.fr.collections.utils.FineLockUtils; |
||||
|
||||
/** |
||||
* <code>Redis</code>实现的集群锁工具类. |
||||
* |
||||
* 需要在{@link com.fr.store.StateServiceActivator}启动后使用. |
||||
* |
||||
* @author Dylan.Liu |
||||
* @version 10.0 |
||||
* Created by Dylan.Liu on 2021/2/2 |
||||
*/ |
||||
public class FineLockKit { |
||||
|
||||
/** |
||||
* 加锁. |
||||
* |
||||
* @param lockName 锁名 |
||||
*/ |
||||
public static void lockViaFineLock(String lockName) { |
||||
FineLockUtils.lockViaFineLock(lockName); |
||||
} |
||||
|
||||
/** |
||||
* 解锁. |
||||
* |
||||
* @param lockName 锁名 |
||||
*/ |
||||
public static void unlockViaFineLock(String lockName) { |
||||
FineLockUtils.unlockViaFineLock(lockName); |
||||
} |
||||
} |
Loading…
Reference in new issue