Skip to content

Commit 2c7c6c3

Browse files
committed
jun_distributed_lock,基于redis实现的分布式锁,同时实现了jdk lock接口,方便与已有项目无缝接入
1 parent 14e921a commit 2c7c6c3

4 files changed

Lines changed: 12 additions & 220 deletions

File tree

jun_distributed_lock/LICENSE

Lines changed: 0 additions & 191 deletions
This file was deleted.

jun_distributed_lock/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# fastlock
2-
基于jdk lock接口实现的分布式锁<br>
3-
方便与已有项目无缝接入<br>
4-
底层实现可以使用redis(已支持)、zookeeper(即将支持)以及自定义实现
1+
# jun_distributed_lock,基于redis实现的分布式锁,同时实现了jdk lock接口,方便与已有项目无缝接入<br>
2+
3+
底层实现redis、zookeeper、MQ、数据库表(也可以支持)、以及自定义实现
54

6-
```java
5+
> ```java
76
Set<HostAndPort> hostAndPortSet = new HashSet<HostAndPort>();
87
hostAndPortSet.add(new HostAndPort("127.0.0.1", 6379));
98
final FastLockManager manager = new JedisFastLockManager(hostAndPortSet);
109
//兼容jdk Lock接口,使用方便,无缝接入
1110
Lock lock = manager.getLock("testKey");
12-
```
11+

jun_distributed_lock/pom.xml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6-
7-
<groupId>com.github.sd4324530</groupId>
8-
<artifactId>fastlock</artifactId>
9-
<version>1.0-SNAPSHOT</version>
10-
<name>fastlock</name>
6+
<groupId>com.jun.plugin</groupId>
7+
<artifactId>jun_distributed_lock</artifactId>
8+
<version>1.0</version>
9+
10+
<name>jun_distributed_lock</name>
1111
<packaging>jar</packaging>
1212

1313
<dependencies>
@@ -38,7 +38,7 @@
3838

3939

4040
<build>
41-
<finalName>fastlock</finalName>
41+
<finalName>jun_distributed_lock</finalName>
4242
<plugins>
4343
<plugin>
4444
<groupId>org.apache.maven.plugins</groupId>
@@ -58,22 +58,6 @@
5858
<attach>true</attach>
5959
</configuration>
6060
</plugin>
61-
<plugin>
62-
<groupId>org.apache.maven.plugins</groupId>
63-
<artifactId>maven-javadoc-plugin</artifactId>
64-
<version>2.10.4</version>
65-
<configuration>
66-
<encoding>UTF-8</encoding>
67-
</configuration>
68-
<executions>
69-
<execution>
70-
<id>attach-javadocs</id>
71-
<goals>
72-
<goal>jar</goal>
73-
</goals>
74-
</execution>
75-
</executions>
76-
</plugin>
7761
<plugin>
7862
<groupId>org.apache.maven.plugins</groupId>
7963
<artifactId>maven-release-plugin</artifactId>

jun_distributed_lock/src/test/resources/logback-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<root level="DEBUG">
1313
<appender-ref ref="STDOUT" />
1414
</root>
15-
<logger name="com.github" level="DEBUG" />
15+
<logger name="com.jun.plugin" level="DEBUG" />
1616
<logger name="org" level="DEBUG"/>
1717
</configuration>

0 commit comments

Comments
 (0)