org.postgresql.pljava
Class TransactionalMap
java.lang.Object
java.util.AbstractMap
java.util.HashMap
org.postgresql.pljava.TransactionalMap
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- public class TransactionalMap
- extends java.util.HashMap
A TransactionalMap acts as a modifiable front for a backing map. All
modifications can be reverted by a call to abort or propagated to
the backing map by a call to commit.
The map is not synchronized so care should be taken if multiple threads
will access the map.
- See Also:
- Serialized Form
Method Summary |
void |
abort()
Undo all changes made since the map was created or since
last commit or abort. |
void |
clear()
Clear this map (an anti-object is inserted for each entry
present in the backed map). |
void |
commit()
Commit all changes made since the map was created or since
last commit or abort. |
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object val)
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
protected java.util.Iterator |
getEntryIterator()
|
protected java.util.Iterator |
getKeyIterator()
|
protected java.util.Iterator |
getValueIterator()
|
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map t)
|
java.lang.Object |
remove(java.lang.Object key)
|
int |
size()
|
java.util.Collection |
values()
|
Methods inherited from class java.util.HashMap |
clone |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
TransactionalMap
protected TransactionalMap(java.util.Map base)
abort
public void abort()
- Undo all changes made since the map was created or since
last commit or abort.
clear
public void clear()
- Clear this map (an anti-object is inserted for each entry
present in the backed map).
commit
public void commit()
- Commit all changes made since the map was created or since
last commit or abort. All changes are propagated to the backing
map.
containsKey
public boolean containsKey(java.lang.Object key)
get
public java.lang.Object get(java.lang.Object key)
remove
public java.lang.Object remove(java.lang.Object key)
size
public int size()
containsValue
public boolean containsValue(java.lang.Object val)
entrySet
public java.util.Set entrySet()
isEmpty
public boolean isEmpty()
keySet
public java.util.Set keySet()
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
putAll
public void putAll(java.util.Map t)
values
public java.util.Collection values()
getEntryIterator
protected java.util.Iterator getEntryIterator()
getKeyIterator
protected java.util.Iterator getKeyIterator()
getValueIterator
protected java.util.Iterator getValueIterator()
Copyright (c) 2003, 2004 TADA AB - Taby Sweden. Distributed under the terms shown in COPYRIGHT