- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap
-
- org.postgresql.pljava.internal.TransactionalMap
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
@Deprecated(since="1.5.3", forRemoval=true) public class TransactionalMap extends HashMap
Deprecated, for removal: This API element is subject to removal in a future version.This class (a) isn't exposed inpljava-api
, (b) is only used to implement the once-transactional attribute map inSession
, and (c) hasn't had transactional behavior even there, since 3ab90e5 (November 2005). Future code needing any kind of store sync'd to PostgreSQL transactions should implement that behavior with Java's ordinary tools, using aTransactionListener
to be kept in sync with transactions.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.- Author:
- Thomas Hallgren
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TransactionalMap.BackedEntry
Deprecated, for removal: This API element is subject to removal in a future version.protected class
TransactionalMap.EntryIterator
Deprecated, for removal: This API element is subject to removal in a future version.protected class
TransactionalMap.KeyIterator
Deprecated, for removal: This API element is subject to removal in a future version.protected class
TransactionalMap.ValueIterator
Deprecated, for removal: This API element is subject to removal in a future version.-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TransactionalMap(Map base)
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
Modifier and Type Method Description void
abort()
Deprecated, for removal: This API element is subject to removal in a future version.Undo all changes made since the map was created or since last commit or abort.void
clear()
Deprecated, for removal: This API element is subject to removal in a future version.Clear this map (an anti-object is inserted for each entry present in the backed map).void
commit()
Deprecated, for removal: This API element is subject to removal in a future version.Commit all changes made since the map was created or since last commit or abort.boolean
containsKey(Object key)
Deprecated, for removal: This API element is subject to removal in a future version.boolean
containsValue(Object val)
Deprecated, for removal: This API element is subject to removal in a future version.Set
entrySet()
Deprecated, for removal: This API element is subject to removal in a future version.Object
get(Object key)
Deprecated, for removal: This API element is subject to removal in a future version.protected Iterator
getEntryIterator()
Deprecated, for removal: This API element is subject to removal in a future version.protected Iterator
getKeyIterator()
Deprecated, for removal: This API element is subject to removal in a future version.protected Iterator
getValueIterator()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isEmpty()
Deprecated, for removal: This API element is subject to removal in a future version.Set
keySet()
Deprecated, for removal: This API element is subject to removal in a future version.Object
put(Object key, Object value)
Deprecated, for removal: This API element is subject to removal in a future version.void
putAll(Map t)
Deprecated, for removal: This API element is subject to removal in a future version.Object
remove(Object key)
Deprecated, for removal: This API element is subject to removal in a future version.int
size()
Deprecated, for removal: This API element is subject to removal in a future version.Collection
values()
Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
TransactionalMap
protected TransactionalMap(Map base)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
abort
public void abort()
Deprecated, for removal: This API element is subject to removal in a future version.Undo all changes made since the map was created or since last commit or abort.
-
clear
public void clear()
Deprecated, for removal: This API element is subject to removal in a future version.Clear this map (an anti-object is inserted for each entry present in the backed map).
-
commit
public void commit()
Deprecated, for removal: This API element is subject to removal in a future version.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(Object key)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
containsKey
in interfaceMap
- Overrides:
containsKey
in classHashMap
-
get
public Object get(Object key)
Deprecated, for removal: This API element is subject to removal in a future version.
-
remove
public Object remove(Object key)
Deprecated, for removal: This API element is subject to removal in a future version.
-
size
public int size()
Deprecated, for removal: This API element is subject to removal in a future version.
-
containsValue
public boolean containsValue(Object val)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
containsValue
in interfaceMap
- Overrides:
containsValue
in classHashMap
-
entrySet
public Set entrySet()
Deprecated, for removal: This API element is subject to removal in a future version.
-
isEmpty
public boolean isEmpty()
Deprecated, for removal: This API element is subject to removal in a future version.
-
keySet
public Set keySet()
Deprecated, for removal: This API element is subject to removal in a future version.
-
put
public Object put(Object key, Object value)
Deprecated, for removal: This API element is subject to removal in a future version.
-
putAll
public void putAll(Map t)
Deprecated, for removal: This API element is subject to removal in a future version.
-
values
public Collection values()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getEntryIterator
protected Iterator getEntryIterator()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getKeyIterator
protected Iterator getKeyIterator()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getValueIterator
protected Iterator getValueIterator()
Deprecated, for removal: This API element is subject to removal in a future version.
-
-