TransactionalMap
Date: 2010-07-30

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.postgresql.pljava.internal
Class TransactionalMap

    java.lang.Object
      java.util.AbstractMap<K,V>
          java.util.HashMap<java.lang.Object,java.lang.Object>
              org.postgresql.pljava.internal.TransactionalMap

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

    public class TransactionalMap

extends java.util.HashMap<java.lang.Object,java.lang.Object>

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

Nested Class Summary
`protected class` | `TransactionalMap.BackedEntry`
`protected class` | `TransactionalMap.EntryIterator`
`protected class` | `TransactionalMap.KeyIterator`
`protected class` | `TransactionalMap.ValueIterator`

Nested classes/interfaces inherited from class java.util.AbstractMap
`java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

Constructor Summary
`protected` | `TransactionalMap(java.util.Map<java.lang.Object,java.lang.Object> base)`

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<java.util.Map.Entry<java.lang.Object,java.lang.Object>>` | `entrySet()`
`java.lang.Object` | `get(java.lang.Object key)`
`protected java.util.Iterator` | `getEntryIterator()`
`protected java.util.Iterator<java.lang.Object>` | `getKeyIterator()`
`protected java.util.Iterator<java.lang.Object>` | `getValueIterator()`
`boolean` | `isEmpty()`
`java.util.Set<java.lang.Object>` | `keySet()`
`java.lang.Object` | `put(java.lang.Object key, java.lang.Object value)`
`void` | `putAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> t)`
`java.lang.Object` | `remove(java.lang.Object key)`
`int` | `size()`
`java.util.Collection<java.lang.Object>` | `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`

Constructor Detail

### TransactionalMap

    protected TransactionalMap(java.util.Map<java.lang.Object,java.lang.Object> base)

Method Detail

### 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).

  Specified by:
    `clear` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `clear` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### 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)

  Specified by:
    `containsKey` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `containsKey` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### get

    public java.lang.Object get(java.lang.Object key)

  Specified by:
    `get` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `get` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### remove

    public java.lang.Object remove(java.lang.Object key)

  Specified by:
    `remove` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `remove` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### size

    public int size()

  Specified by:
    `size` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `size` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### containsValue

    public boolean containsValue(java.lang.Object val)

  Specified by:
    `containsValue` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `containsValue` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### entrySet

    public java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> entrySet()

  Specified by:
    `entrySet` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `entrySet` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `isEmpty` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### keySet

    public java.util.Set<java.lang.Object> keySet()

  Specified by:
    `keySet` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `keySet` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### put

    public java.lang.Object put(java.lang.Object key,
                                java.lang.Object value)

  Specified by:
    `put` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `put` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### putAll

    public void putAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> t)

  Specified by:
    `putAll` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `putAll` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### values

    public java.util.Collection<java.lang.Object> values()

  Specified by:
    `values` in interface `java.util.Map<java.lang.Object,java.lang.Object>`
  Overrides:
    `values` in class `java.util.HashMap<java.lang.Object,java.lang.Object>`

### getEntryIterator

    protected java.util.Iterator getEntryIterator()

### getKeyIterator

    protected java.util.Iterator<java.lang.Object> getKeyIterator()

### getValueIterator

    protected java.util.Iterator<java.lang.Object> getValueIterator()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \ Distributed under the terms shown in COPYRIGHT