Class TransactionalMap

java.lang.Object
java.util.AbstractMap
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 in pljava-api, (b) is only used to implement the once-transactional attribute map in Session, 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 a TransactionListener 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:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected class 
    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,V>, AbstractMap.SimpleImmutableEntry<K,V>

    Nested classes/interfaces inherited from interface java.util.Map

    Map.Entry<K,V>
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    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
    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
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    get(Object key)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected Iterator
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected Iterator
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected Iterator
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    put(Object key, Object value)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    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
  • Constructor Details

    • TransactionalMap

      protected TransactionalMap(Map base)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • 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).
      Specified by:
      clear in interface Map
      Overrides:
      clear in class HashMap
    • 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 interface Map
      Overrides:
      containsKey in class HashMap
    • get

      public Object get(Object key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      get in interface Map
      Overrides:
      get in class HashMap
    • remove

      public Object remove(Object key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      remove in interface Map
      Overrides:
      remove in class HashMap
    • size

      public int size()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      size in interface Map
      Overrides:
      size in class HashMap
    • containsValue

      public boolean containsValue(Object val)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      containsValue in interface Map
      Overrides:
      containsValue in class HashMap
    • entrySet

      public Set entrySet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      entrySet in interface Map
      Overrides:
      entrySet in class HashMap
    • isEmpty

      public boolean isEmpty()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      isEmpty in interface Map
      Overrides:
      isEmpty in class HashMap
    • keySet

      public Set keySet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      keySet in interface Map
      Overrides:
      keySet in class HashMap
    • put

      public Object put(Object key, Object value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      put in interface Map
      Overrides:
      put in class HashMap
    • putAll

      public void putAll(Map t)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      putAll in interface Map
      Overrides:
      putAll in class HashMap
    • values

      public Collection values()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      values in interface Map
      Overrides:
      values in class HashMap
    • 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.