- All Implemented Interfaces:
Limiter<Lock>
public class JdkLock
extends Lock
基于ConcurrentHashMap和ReentrantLock实现的一个简单的锁组件
- Since:
- Java 17+
- Version:
- 6.5.0
- Author:
- Kimi Liu
-
Constructor Summary
Constructors
JdkLock(String lockName,
int initialCapacity,
float loadFactor,
int concurrencyLevel)
-
Method Summary
Methods inherited from class org.aoju.bus.limiter.support.lock.Lock
limit, release
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
JdkLock
public JdkLock(String lockName,
int initialCapacity,
float loadFactor,
int concurrencyLevel)
-
JdkLock
public JdkLock(String lockName)
-
Method Details
-
-
-
getLimiterName
public String getLimiterName()
Description copied from interface: Limiter
该限制器的名字 方便定位哪一个限制器被应用
- Returns:
- the string