K
- V
- public class TxMap<K,V> extends Object implements 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<Object,TxMap.Box> |
boxGetter |
protected Map<K,TxMap.Box> |
M |
protected VBox<Integer> |
sizebox |
protected HGTransactionManager |
txManager |
Constructor and Description |
---|
TxMap(HGTransactionManager tManager,
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(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
protected TxMap.Box |
getBox(Object key) |
boolean |
isEmpty() |
Set<K> |
keySet() |
int |
mapSize() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
protected HGTransactionManager txManager
protected RefResolver<Object,TxMap.Box> boxGetter
public TxMap(HGTransactionManager tManager, 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.
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public int mapSize()
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
Copyright © 2015. All rights reserved.