All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jiangkedev.lock.DistributedLock Maven / Gradle / Ivy

The newest version!
package com.jiangkedev.lock;

/**DistributedLock.java 顶级接口
 * @author jiangke
 * @date 22:18
 */
public interface DistributedLock {
    long TIMEOUT_MILLIS = 30000;
    int RETRY_TIMES = Integer.MAX_VALUE;
    long SLEEP_MILLIS = 500;
    boolean lock(String key);
    boolean lock(String key,int retryTimes);
    boolean lock(String key,int retryTimes,long sleepMillis);
    boolean lock(String key,long expire);
    boolean lock(String key,long expire,int retryTimes);
    boolean lock(String key, long expire, int retryTime, long sleepMillis);
    boolean releaseLock(String key);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy