release branch 0.0.3
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user