Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class ConverterCollections.ConverterMapEvent

`java.lang.Object
java.util.EventObject
com.tangosol.util.MapEvent
com.tangosol.net.cache.CacheEvent
com.tangosol.util.ConverterCollections.ConverterMapEvent`

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  ConverterCollections.ConverterCacheEvent

Enclosing class:
  ConverterCollections

      public static class ConverterCollections.ConverterMapEvent

extends CacheEvent

A ConverterMapEvent views an underlying MapEvent through a set of key and value Converters. This event may cache converted keys and/or values to optimize out future conversions.

Nested Class Summary
`protected class` | `ConverterCollections.ConverterMapEvent.ConverterMapEventEntry` ConverterMapEventEntry provides both the Map Entry and the BinaryEntry interface to the information encapsulated inside the ConvertMapEvent.

Field Summary
`protected BackingMapManagerContext` | `m_context` The BackingMapManagerContext to use for extracting binary values.
`protected Converter` | `m_convKey` The Converter to view the underlying MapEvent's key.
`protected Converter` | `m_convVal` The Converter to view the underlying MapEvent's value.
`protected MapEvent` | `m_event` The underlying MapEvent.
`static Object` | `NO_VALUE` Tag object indicating that a corresponding value has not been converted.

Fields inherited from class com.tangosol.net.cache.CacheEvent
`m_fSynthetic`

Fields inherited from class com.tangosol.util.MapEvent
`ENTRY_DELETED, ENTRY_INSERTED, ENTRY_UPDATED, m_nId, m_oKey, m_oValueNew, m_oValueOld`

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`ConverterCollections.ConverterMapEvent(ObservableMap map, MapEvent event, Converter convKey, Converter convVal)` Construct a ConverterMapEvent.
`ConverterCollections.ConverterMapEvent(ObservableMap map, MapEvent event, Converter convKey, Converter convVal, BackingMapManagerContext context)` Construct a ConverterMapEvent.

Method Summary
`void` | `clearConverted()` Remove any cached conversions of the key or values.
`BackingMapManagerContext` | `getContext()` Get the BackingMapManagerContext if one was provided.
`Converter` | `getConverterKeyUp()` Return the Converter used to view the underlying MapEvent's key through.
`Converter` | `getConverterValueUp()` Return the Converter used to view the underlying MapEvent's value through.
`Object` | `getKey()` Return a key associated with this event.
`MapEvent` | `getMapEvent()` Return the underlying MapEvent.
`Map.Entry` | `getNewEntry()` Return a Map Entry that represents the state of the Entry after the change occurred that generated this event.
`Object` | `getNewValue()` Return a new value associated with this event.
`Map.Entry` | `getOldEntry()` Return a Map Entry that represents the state of the Entry before the change occurred that generated this event.
`Object` | `getOldValue()` Return an old value associated with this event.
`boolean` | `isKeyConverted()` Check if the event's key has been converted.
`boolean` | `isNewValueConverted()` Check if the event's new value has been converted.
`boolean` | `isOldValueConverted()` Check if the event's old value has been converted.
`void` | `setKey(Object oKey)` Set the cached converted old value associated with this event.
`void` | `setNewValue(Object oValue)` Set the cached converted new value associated with this event.
`void` | `setOldValue(Object oValue)` Set the cached converted old value associated with this event.

Methods inherited from class com.tangosol.net.cache.CacheEvent
`getDescription, isSynthetic`

Methods inherited from class com.tangosol.util.MapEvent
`dispatch, dispatch, dispatch, getDescription, getId, getMap, toString`

Methods inherited from class java.util.EventObject
`getSource`

Field Detail

### NO_VALUE

    public static final Object NO_VALUE

  Tag object indicating that a corresponding value has not been converted.

### m_event

    protected MapEvent m_event

  The underlying MapEvent.

### m_convKey

    protected Converter m_convKey

  The Converter to view the underlying MapEvent's key.

### m_convVal

    protected Converter m_convVal

  The Converter to view the underlying MapEvent's value.

### m_context

    protected BackingMapManagerContext m_context

  The BackingMapManagerContext to use for extracting binary values.

Constructor Detail

### ConverterCollections.ConverterMapEvent

    public ConverterCollections.ConverterMapEvent(ObservableMap map,
                                                  MapEvent event,
                                                  Converter convKey,
                                                  Converter convVal)

  Construct a ConverterMapEvent.
  Parameters:
    `event` - the underlying MapEvent
    `map` - the new event's source
    `convKey` - the Converter to view the underlying MapEvent's key
    `convVal` - the Converter to view the underlying MapEvent's values

### ConverterCollections.ConverterMapEvent

    public ConverterCollections.ConverterMapEvent(ObservableMap map,
                                                  MapEvent event,
                                                  Converter convKey,
                                                  Converter convVal,
                                                  BackingMapManagerContext context)

  Construct a ConverterMapEvent.
  Parameters:
    `event` - the underlying MapEvent
    `map` - the new event's source
    `convKey` - the Converter to view the underlying MapEvent's key
    `convVal` - the Converter to view the underlying MapEvent's values
    `context` - the BackingMapManagerContext necessary to emulate the BinaryEntry interface

Method Detail

### getKey

    public Object getKey()

  Return a key associated with this event.
  Overrides:
    `getKey` in class `MapEvent`
  Returns:
    a key

### getOldValue

    public Object getOldValue()

  Return an old value associated with this event.

  The old value represents a value deleted from or updated in a map. It is always null for "insert" notifications.

  Overrides:
    `getOldValue` in class `MapEvent`
  Returns:
    an old value

### getNewValue

    public Object getNewValue()

  Return a new value associated with this event.

  The new value represents a new value inserted into or updated in a map. It is always null for "delete" notifications.

  Overrides:
    `getNewValue` in class `MapEvent`
  Returns:
    a new value

### getOldEntry

    public Map.Entry getOldEntry()

  Return a Map Entry that represents the state of the Entry before the change occurred that generated this event.
  Overrides:
    `getOldEntry` in class `MapEvent`
  Returns:
    a Map Entry representing the pre-event state of the Entry

### getNewEntry

    public Map.Entry getNewEntry()

  Return a Map Entry that represents the state of the Entry after the change occurred that generated this event.
  Overrides:
    `getNewEntry` in class `MapEvent`
  Returns:
    a Map Entry representing the post-event state of the Entry

### getMapEvent

    public MapEvent getMapEvent()

  Return the underlying MapEvent.
  Returns:
    the underlying MapEvent

### getContext

    public BackingMapManagerContext getContext()

  Get the BackingMapManagerContext if one was provided.
  Returns:
    the BackingMapManagerContext

### getConverterKeyUp

    public Converter getConverterKeyUp()

  Return the Converter used to view the underlying MapEvent's key through.
  Returns:
    the Converter from the underlying MapEvent's key

### getConverterValueUp

    public Converter getConverterValueUp()

  Return the Converter used to view the underlying MapEvent's value through.
  Returns:
    the Converter from the underlying MapEvent's value

### setKey

    public void setKey(Object oKey)

  Set the cached converted old value associated with this event.
  Parameters:
    `oKey` - the converted key value

### setOldValue

    public void setOldValue(Object oValue)

  Set the cached converted old value associated with this event.
  Parameters:
    `oValue` - the new converted "old" value

### setNewValue

    public void setNewValue(Object oValue)

  Set the cached converted new value associated with this event.
  Parameters:
    `oValue` - the new converted "new" value

### isKeyConverted

    public boolean isKeyConverted()

  Check if the event's key has been converted.
  Returns:
    true iff the key has been converted

### isOldValueConverted

    public boolean isOldValueConverted()

  Check if the event's old value has been converted.
  Returns:
    true iff the old value has been converted

### isNewValueConverted

    public boolean isNewValueConverted()

  Check if the event's new value has been converted.
  Returns:
    true iff the new value has been converted

### clearConverted

    public void clearConverted()

  Remove any cached conversions of the key or values.

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.