release branch 0.0.3

This commit is contained in:
binbin.hou
2021-12-08 10:19:58 +08:00
parent d06effa306
commit ecd879763a
25 changed files with 232 additions and 43 deletions

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>lock</artifactId>
<groupId>com.github.houbb</groupId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -0,0 +1,33 @@
package com.github.houbb.lock.api.support;
/**
* 操作接口定义
*
* ps: 可以基于集中式数据库做操作
*
* @author binbin.hou
* @since 0.0.3
*/
public interface IOperator {
/**
* 尝试获取分布式锁
*
* @param lockKey 锁
* @param requestId 请求标识
* @param expireTimeMills 超期时间
* @return 是否获取成功
* @since 0.0.3
*/
boolean lock(String lockKey, String requestId, int expireTimeMills);
/**
* 解锁
* @param lockKey 锁 key
* @param requestId 请求标识
* @return 结果
* @since 0.0.3
*/
boolean unlock(String lockKey, String requestId);
}