Class 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:
    Serialized Form
    • 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.
       
    • 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).
        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.