Package org.aoju.bus.core.lock
Class MapWithLock<K,V>
- Type Parameters:
K- 键类型V- 值类型
- All Implemented Interfaces:
Serializable
Map对象读写锁
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
ConstructorsConstructorDescription构造对象MapWithLock(int initCapacity) 构造对象MapWithLock(Map<K, V> map) 构造对象MapWithLock(Map<K, V> map, ReentrantReadWriteLock lock) 构造对象 -
Method Summary
-
Constructor Details
-
MapWithLock
public MapWithLock()构造对象 -
MapWithLock
public MapWithLock(int initCapacity) 构造对象- Parameters:
initCapacity- 大小
-
MapWithLock
-
MapWithLock
-
-
Method Details
-
put
-
putIfAbsent
-
putAll
-
clear
public void clear()清空 -
remove
-
get
-
size
public int size()对象大小- Returns:
- the int
-
copy
-