|
@@ -9,7 +9,7 @@ import org.redisson.api.RedissonClient;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@Slf4j
|
|
|
-public class LockUtils2 {
|
|
|
+public class LockUtils {
|
|
|
|
|
|
private String name;
|
|
|
|
|
@@ -29,7 +29,7 @@ public class LockUtils2 {
|
|
|
* @param name
|
|
|
* @return
|
|
|
*/
|
|
|
- public LockUtils2 name(String name) {
|
|
|
+ public LockUtils name(String name) {
|
|
|
this.name = name;
|
|
|
return this;
|
|
|
}
|
|
@@ -39,7 +39,7 @@ public class LockUtils2 {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public LockUtils2 tryLock(FunctionUtils.NoParamsNoResult fialFunction) {
|
|
|
+ public LockUtils tryLock(FunctionUtils.NoParamsNoResult fialFunction) {
|
|
|
this.tryLock = true;
|
|
|
this.fialFunction = fialFunction;
|
|
|
return this;
|
|
@@ -51,7 +51,7 @@ public class LockUtils2 {
|
|
|
* @param timeout 等待时间
|
|
|
* @return
|
|
|
*/
|
|
|
- public LockUtils2 tryLock(int timeout, FunctionUtils.NoParamsNoResult fialFunction) {
|
|
|
+ public LockUtils tryLock(int timeout, FunctionUtils.NoParamsNoResult fialFunction) {
|
|
|
this.tryLock = true;
|
|
|
this.timeout = timeout;
|
|
|
this.fialFunction = fialFunction;
|
|
@@ -64,7 +64,7 @@ public class LockUtils2 {
|
|
|
* @param timeout 等待时间
|
|
|
* @return
|
|
|
*/
|
|
|
- public LockUtils2 tryLock(int timeout) {
|
|
|
+ public LockUtils tryLock(int timeout) {
|
|
|
this.tryLock = true;
|
|
|
this.timeout = timeout;
|
|
|
return this;
|
|
@@ -76,7 +76,7 @@ public class LockUtils2 {
|
|
|
* @param timelose
|
|
|
* @return
|
|
|
*/
|
|
|
- public LockUtils2 timelose(int timelose) {
|
|
|
+ public LockUtils timelose(int timelose) {
|
|
|
this.timelose = timelose;
|
|
|
return this;
|
|
|
}
|
|
@@ -87,7 +87,7 @@ public class LockUtils2 {
|
|
|
* @param timeunit
|
|
|
* @return
|
|
|
*/
|
|
|
- public LockUtils2 timeunit(TimeUnit timeunit) {
|
|
|
+ public LockUtils timeunit(TimeUnit timeunit) {
|
|
|
this.timeunit = timeunit;
|
|
|
return this;
|
|
|
}
|