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

io.github.icodegarden.commons.lang.concurrent.lock.DistributedLock Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package io.github.icodegarden.commons.lang.concurrent.lock;


/**
 * 

不支持Reentrant的互斥锁

全程互斥
* * @author Fangfang.Xu * */ public interface DistributedLock { boolean isAcquired() throws LockException; /** * 阻塞直到获取到 */ void acquire() throws LockException; /** * * @param timeoutMillis 阻塞的时间 * @return 是否获取成功 */ boolean acquire(long timeoutMillis) throws LockException; void release() throws LockException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy