K - Type of the keys.V - Type of the values.public class ReadCommitedTransactionalMap<K,V> extends Object implements org.everit.transaction.map.TransactionalMap<K,V>
Map interface that does all modification only during commiting
the transaction.| Modifier and Type | Field and Description |
|---|---|
protected ThreadLocal<MapTxContext<K,V>> |
activeTx |
protected Map<Object,MapTxContext<K,V>> |
suspendedTXContexts |
protected RWLockedMap<K,V> |
wrapped |
| Constructor and Description |
|---|
ReadCommitedTransactionalMap(Map<K,V> wrapped)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
protected Map<K,V> |
coalesceActiveTxOrWrapped() |
void |
commitTransaction() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
protected MapTxContext<K,V> |
createMapTxContext(Object transaction) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
protected MapTxContext<K,V> |
getActiveTx() |
Object |
getAssociatedTransaction() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
void |
resumeTransaction(Object transaction) |
void |
rollbackTransaction() |
protected void |
setActiveTx(MapTxContext<K,V> mapContext) |
int |
size() |
void |
startTransaction(Object transaction) |
void |
suspendTransaction()
Suspends the context for a specific transaction.
|
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllprotected ThreadLocal<MapTxContext<K,V>> activeTx
protected final Map<Object,MapTxContext<K,V>> suspendedTXContexts
protected final RWLockedMap<K,V> wrapped
public void commitTransaction()
public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>protected MapTxContext<K,V> createMapTxContext(Object transaction)
protected MapTxContext<K,V> getActiveTx()
public Object getAssociatedTransaction()
public void resumeTransaction(Object transaction)
public void rollbackTransaction()
protected void setActiveTx(MapTxContext<K,V> mapContext)
public void startTransaction(Object transaction)
public void suspendTransaction()
Copyright © 2011–2015 Everit Kft.. All rights reserved.