Class SnapshotMap<K,V>
java.lang.Object
org.jboss.resteasy.util.snapshot.SnapshotMap<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,
,V> Map<K,
V>
Acts as a HashMap until lockSnapshots is called. After that, it is a copy on write strategy.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSnapshotMap
(boolean lockSnapshots) SnapshotMap
(Map<K, V> existing, boolean shallow, boolean lockSnapshots, boolean snapFirst) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
isEmpty()
keySet()
void
void
putIfAbsent
(K key, V value) boolean
boolean
int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
SnapshotMap
public SnapshotMap(boolean lockSnapshots) -
SnapshotMap
-
-
Method Details
-
lockSnapshots
public void lockSnapshots() -
putIfAbsent
- Specified by:
putIfAbsent
in interfaceConcurrentMap<K,
V> - Specified by:
putIfAbsent
in interfaceMap<K,
V>
-
remove
-
replace
-
replace
-
size
-
isEmpty
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
putAll
-
clear
-
keySet
-
values
-
entrySet
-