K
- V
- public class TxMap<K,V>
extends java.lang.Object
implements java.util.Map<K,V>
A transactional map - every operation on this map is conducted within a transaction and
becomes void if the transaction is aborted. This map doesn't support null
s
as values - a null indicates absence of a value.
Modifier and Type | Class and Description |
---|---|
protected class |
TxMap.Box |
Modifier and Type | Field and Description |
---|---|
protected RefResolver<java.lang.Object,TxMap.Box> |
boxGetter |
protected java.util.Map<K,TxMap.Box> |
M |
protected VBox<java.lang.Integer> |
sizebox |
protected HGTransactionManager |
txManager |
Constructor and Description |
---|
TxMap(HGTransactionManager tManager,
java.util.Map backingMap)
The constructor expects a
HGTransactionManager and the map to be used
to hold the entries. |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
protected TxMap.Box |
getBox(java.lang.Object key) |
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
int |
mapSize() |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> m) |
V |
remove(java.lang.Object key) |
int |
size() |
java.util.Collection<V> |
values() |
protected HGTransactionManager txManager
protected RefResolver<java.lang.Object,TxMap.Box> boxGetter
protected VBox<java.lang.Integer> sizebox
public TxMap(HGTransactionManager tManager, java.util.Map backingMap)
The constructor expects a HGTransactionManager
and the map to be used
to hold the entries. The backingMap
parameter must be an empty map
and it is not fully typed since internal object wrappers will be used to manage
the transactional aspect.
protected TxMap.Box getBox(java.lang.Object key)
public boolean containsKey(java.lang.Object key)
public int mapSize()
public boolean containsValue(java.lang.Object value)