Package nablarch.core.util.map
Class ExclusiveAccessMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
nablarch.core.util.map.MapWrapper<K,V>
nablarch.core.util.map.LockableMap<K,V>
nablarch.core.util.map.ExclusiveAccessMap<K,V>
- Type Parameters:
K- キーの型V- 値の型
与えられたMapに対する自動排他制御を実装するラッパークラス。
アクセサを使用した時点で排他ロックを自動的に取得する。
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionExclusiveAccessMap(Map<K, V> baseMap) コンストラクタ。ExclusiveAccessMap(Map<K, V> baseMap, ReentrantLock lock) コンストラクタ -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class nablarch.core.util.map.LockableMap
deactivate, getDelegateMap, lock, lockInterruptibly, newCondition, tryLock, tryLock, unlockMethods inherited from class nablarch.core.util.map.MapWrapper
equals, getDelegateMapOfType, hashCode, toStringMethods inherited from class java.util.AbstractMap
cloneMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ExclusiveAccessMap
コンストラクタ。- Parameters:
baseMap- ラップ対象のMap
-
ExclusiveAccessMap
コンストラクタ- Parameters:
baseMap- ラップ対象のMaplock- ロックオブジェクト
-
-
Method Details
-
clear
public void clear()MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
containsKey
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classMapWrapper<K,V>
-
containsValue
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。- Specified by:
containsValuein interfaceMap<K,V> - Overrides:
containsValuein classMapWrapper<K,V>
-
entrySet
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
get
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
isEmpty
public boolean isEmpty()MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
keySet
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
put
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
putAll
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
remove
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
size
public int size()MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。 -
values
MapWrapper.getDelegateMap()が返すMapオブジェクトに処理を委譲する。
-