Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class ConverterCollections.ConverterObservableMap

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.util.ConverterCollections.ConverterMap
              com.tangosol.util.ConverterCollections.ConverterObservableMap

All Implemented Interfaces:
  ObservableMap, java.io.Serializable, java.util.Map

Direct Known Subclasses:
  ConverterCollections.ConverterCacheMap

Enclosing class:
  ConverterCollections

    public static class ConverterCollections.ConverterObservableMap

extends ConverterCollections.ConverterMap
implements ObservableMap, java.io.Serializable

A Converter ObservableMap views an underlying ObservableMap through a set of key and value Converters.

Nested Class Summary

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

Field Summary

Fields inherited from class com.tangosol.util.ConverterCollections.ConverterMap
`m_convKeyDown, m_convKeyUp, m_convValDown, m_convValUp, m_map, m_set`

Constructor Summary
`ConverterCollections.ConverterObservableMap(ObservableMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)` Constructor.

Method Summary
`void` | `addMapListener(MapListener listener)` Add a standard map listener that will receive all events (inserts, updates, deletes) that occur against the map, with the key, old-value and new-value included.
`void` | `addMapListener(MapListener listener, Filter filter, boolean fLite)` Add a map listener that receives events based on a filter evaluation.
`void` | `addMapListener(MapListener listener, java.lang.Object oKey, boolean fLite)` Add a map listener for a specific key.
`protected MapListener` | `getConverterListener(MapListener listener)` Create a converter listener for the specified listener.
`ObservableMap` | `getObservableMap()` Return the underlying ObservableMap.
`void` | `removeMapListener(MapListener listener)` Remove a standard map listener that previously signed up for all events.
`void` | `removeMapListener(MapListener listener, Filter filter)` Remove a map listener that previously signed up for events based on a filter evaluation.
`void` | `removeMapListener(MapListener listener, java.lang.Object oKey)` Remove a map listener that previously signed up for events about a specific key.

Methods inherited from class com.tangosol.util.ConverterCollections.ConverterMap
`clear, containsKey, containsValue, entrySet, get, getConverterKeyDown, getConverterKeyUp, getConverterValueDown, getConverterValueUp, getMap, instantiateCollection, instantiateEntrySet, instantiateMap, instantiateSet, isEmpty, keySet, put, putAll, remove, size, toString, values`

Methods inherited from interface java.util.Map
`clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values`

Constructor Detail

### ConverterCollections.ConverterObservableMap

    public ConverterCollections.ConverterObservableMap(ObservableMap map,
                                                       Converter convKeyUp,
                                                       Converter convKeyDown,
                                                       Converter convValUp,
                                                       Converter convValDown)

  Constructor.

  Parameters:
    `map` - the underlying ObservableMap
    `convKeyUp` - the Converter to view the underlying ObservableMap's keys through
    `convKeyDown` - the Converter to use to pass keys down to the underlying ObservableMap
    `convValUp` - the Converter to view the underlying ObservableMap's values through
    `convValDown` - the Converter to use to pass values down to the underlying ObservableMap

Method Detail

### addMapListener

    public void addMapListener(MapListener listener)

  Add a standard map listener that will receive all events (inserts, updates, deletes) that occur against the map, with the key, old-value and new-value included. This has the same result as the following call:

         addMapListener(listener, (Filter) null, false);

  Specified by:
    `addMapListener` in interface `ObservableMap`
  Parameters:
    `listener` - the `MapEvent` listener to add

### removeMapListener

    public void removeMapListener(MapListener listener)

  Remove a standard map listener that previously signed up for all events. This has the same result as the following call:

         removeMapListener(listener, (Filter) null);

  Specified by:
    `removeMapListener` in interface `ObservableMap`
  Parameters:
    `listener` - the listener to remove

### addMapListener

    public void addMapListener(MapListener listener,
                               java.lang.Object oKey,
                               boolean fLite)

  Add a map listener for a specific key.

  The listeners will receive MapEvent objects, but if fLite is passed as true, they might not contain the OldValue and NewValue properties.

  To unregister the MapListener, use the `ObservableMap.removeMapListener(MapListener, Object)` method.

  Specified by:
    `addMapListener` in interface `ObservableMap`
  Parameters:
    `listener` - the `MapEvent` listener to add
    `oKey` - the key that identifies the entry for which to raise events
    `fLite` - true to indicate that the `MapEvent` objects do not have to include the OldValue and NewValue property values in order to allow optimizations

### removeMapListener

    public void removeMapListener(MapListener listener,
                                  java.lang.Object oKey)

  Remove a map listener that previously signed up for events about a specific key.

  Specified by:
    `removeMapListener` in interface `ObservableMap`
  Parameters:
    `listener` - the listener to remove
    `oKey` - the key that identifies the entry for which to raise events

### addMapListener

    public void addMapListener(MapListener listener,
                               Filter filter,
                               boolean fLite)

  Add a map listener that receives events based on a filter evaluation.

  The listeners will receive MapEvent objects, but if fLite is passed as true, they might not contain the OldValue and NewValue properties.

  To unregister the MapListener, use the `ObservableMap.removeMapListener(MapListener, Filter)` method.

  Specified by:
    `addMapListener` in interface `ObservableMap`
  Parameters:
    `listener` - the `MapEvent` listener to add
    `filter` - a filter that will be passed MapEvent objects to select from; a MapEvent will be delivered to the listener only if the filter evaluates to true for that MapEvent (see `MapEventFilter`); null is equivalent to a filter that alway returns true
    `fLite` - true to indicate that the `MapEvent` objects do not have to include the OldValue and NewValue property values in order to allow optimizations

### removeMapListener

    public void removeMapListener(MapListener listener,
                                  Filter filter)

  Remove a map listener that previously signed up for events based on a filter evaluation.

  Specified by:
    `removeMapListener` in interface `ObservableMap`
  Parameters:
    `listener` - the listener to remove
    `filter` - the filter that was passed into the corresponding addMapListener() call

### getConverterListener

    protected MapListener getConverterListener(MapListener listener)

  Create a converter listener for the specified listener.

  Parameters:
    `listener` - the underlying listener
  Returns:
    the converting listener

### getObservableMap

    public ObservableMap getObservableMap()

  Return the underlying ObservableMap.

  Returns:
    the underlying ObservableMap

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.