K
- the type of keys maintained by this mapV
- the type of mapped valuespublic class AtomicHashMapProxy<K,V> extends AutoBatchSupport implements AtomicMap<K,V>
AtomicHashMap
to provide consistency and isolation for concurrent readers
while writes may also be going on. The techniques used in this implementation are very similar to the lock-free
reader MVCC model used in the MVCCEntry
implementations for the core data
container, which closely follow software transactional memory approaches to dealing with concurrency.
AtomicHashMap.getProxy(org.infinispan.AdvancedCache, Object, boolean)
}
should be used to retrieve an instance of this proxy.
AtomicMapLookup
helper, and would not be created by end-user code
directly.AtomicHashMap
Modifier and Type | Field and Description |
---|---|
protected AdvancedCache<Object,AtomicMap<K,V>> |
cache |
protected AdvancedCache<Object,AtomicMap<K,V>> |
cacheForWriting |
protected Object |
deltaMapKey |
protected boolean |
startedReadingMap |
protected TransactionManager |
transactionManager |
protected TransactionTable |
transactionTable |
batchContainer
Modifier and Type | Method and Description |
---|---|
protected void |
assertValid(AtomicHashMap<?,?> map) |
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
protected AtomicHashMap<K,V> |
getDeltaMapForRead() |
protected AtomicHashMap<K,V> |
getDeltaMapForWrite() |
boolean |
isEmpty() |
Set<K> |
keySet() |
protected CacheEntry |
lookupEntryFromCurrentTransaction()
Looks up the CacheEntry stored in transactional context corresponding to this AtomicMap.
|
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
protected AtomicHashMap<K,V> |
toMap(Object object) |
String |
toString() |
Collection<V> |
values() |
assertBatchingSupported, endAtomic, failAtomic, startAtomic
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected final Object deltaMapKey
protected final AdvancedCache<Object,AtomicMap<K,V>> cache
protected final AdvancedCache<Object,AtomicMap<K,V>> cacheForWriting
protected volatile boolean startedReadingMap
protected TransactionTable transactionTable
protected TransactionManager transactionManager
protected AtomicHashMap<K,V> toMap(Object object)
protected AtomicHashMap<K,V> getDeltaMapForRead()
protected CacheEntry lookupEntryFromCurrentTransaction()
protected AtomicHashMap<K,V> getDeltaMapForWrite()
protected void assertValid(AtomicHashMap<?,?> map)
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
Copyright © 2016 JBoss, a division of Red Hat. All rights reserved.