Package com.tangosol.util
Class ConverterCollections.ConverterMapEvent<K,V> 
java.lang.Object
java.util.EventObject
com.tangosol.util.MapEvent<K,V>
 
com.tangosol.net.cache.CacheEvent<K,V>
 
com.tangosol.util.ConverterCollections.ConverterMapEvent<K,V> 
- All Implemented Interfaces:
- PortableObject,- Serializable
- Direct Known Subclasses:
- ConverterCollections.ConverterCacheEvent
- Enclosing class:
- ConverterCollections
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.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classConverterMapEventBinaryEntry provides both the Map Entry and the BinaryEntry interfaces to the information encapsulated inside the ConverterMapEvent.protected classConverterMapEventEntry provides the Map Entry interface to the information encapsulated inside the ConverterMapEvent.Nested classes/interfaces inherited from class com.tangosol.net.cache.CacheEventCacheEvent.TransformationState
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected BackingMapManagerContextThe BackingMapManagerContext to use for extracting binary values.The Converter to view the underlying MapEvent's key.The Converter to view the underlying MapEvent's value.Cached new entry.Cached old entry.The underlying MapEvent.static final ObjectTag object indicating that a corresponding value has not been converted.Fields inherited from class com.tangosol.net.cache.CacheEventEXPIRED, m_nFlags, m_transformState, PRIMING, SYNTHETICFields inherited from class com.tangosol.util.MapEventENTRY_DELETED, ENTRY_INSERTED, ENTRY_UPDATED, m_key, m_nId, m_nPartition, m_nVersion, m_valueNew, m_valueOldFields inherited from class java.util.EventObjectsource
- 
Constructor SummaryConstructorsConstructorDescriptionConverterMapEvent(ObservableMap<K, V> map, MapEvent<K, V> event, Converter<K, K> convKey, Converter<V, V> convVal) Construct a ConverterMapEvent.ConverterMapEvent(ObservableMap<K, V> map, MapEvent<K, V> event, Converter<K, K> convKey, Converter<V, V> convVal, BackingMapManagerContext context) Construct a ConverterMapEvent.
- 
Method SummaryModifier and TypeMethodDescriptionvoidRemove any cached conversions of the key or values.Get the BackingMapManagerContext if one was provided.Return the Converter used to view the underlying MapEvent's key through.Return the Converter used to view the underlying MapEvent's value through.getKey()Return a key associated with this event.Return the underlying MapEvent.Return a Map Entry that represents the state of the Entry after the change occurred that generated this event.Return a new value associated with this event.Return a Map Entry that represents the state of the Entry before the change occurred that generated this event.Return an old value associated with this event.intReturn the partition this MapEvent represents or -1 if the event source is not partition aware.longReturn the version that represents the change that caused this MapEvent.booleanCheck if the event's key has been converted.booleanCheck if the event's new value has been converted.booleanCheck if the event's old value has been converted.booleanReturn true iff this event is caused by a synthetic version update sent by the server to notify clients of the current version.voidSet the cached converted old value associated with this event.voidsetNewValue(V value) Set the cached converted new value associated with this event.voidsetOldValue(V value) Set the cached converted old value associated with this event.Methods inherited from class com.tangosol.net.cache.CacheEventgetDescription, getTransformationState, isExpired, isPriming, isSynthetic, shouldDispatch, withMethods inherited from class com.tangosol.util.MapEventdispatch, dispatch, dispatch, getDescription, getId, getMap, isDelete, isInsert, isUpdate, readExternal, toString, writeExternalMethods inherited from class java.util.EventObjectgetSource
- 
Field Details- 
NO_VALUETag object indicating that a corresponding value has not been converted.
- 
m_eventThe underlying MapEvent.
- 
m_convKeyThe Converter to view the underlying MapEvent's key.
- 
m_convValThe Converter to view the underlying MapEvent's value.
- 
m_contextThe BackingMapManagerContext to use for extracting binary values.
- 
m_entryOldCached old entry.
- 
m_entryNewCached new entry.
 
- 
- 
Constructor Details- 
ConverterMapEventpublic ConverterMapEvent(ObservableMap<K, V> map, MapEvent<K, V> event, Converter<K, K> convKey, Converter<V, V> convVal) Construct a ConverterMapEvent.- Parameters:
- map- the new event's source
- event- the underlying MapEvent
- convKey- the Converter to view the underlying MapEvent's key
- convVal- the Converter to view the underlying MapEvent's values
 
- 
ConverterMapEventpublic ConverterMapEvent(ObservableMap<K, V> map, MapEvent<K, V> event, Converter<K, K> convKey, Converter<V, V> convVal, BackingMapManagerContext context) Construct a ConverterMapEvent.- Parameters:
- map- the new event's source
- event- the underlying MapEvent
- 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 Details- 
getKeyReturn a key associated with this event.
- 
getOldValueReturn 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:
- getOldValuein class- MapEvent<K,- V> 
- Returns:
- an old value
 
- 
getNewValueReturn 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:
- getNewValuein class- MapEvent<K,- V> 
- Returns:
- a new value
 
- 
getOldEntryReturn a Map Entry that represents the state of the Entry before the change occurred that generated this event.- Overrides:
- getOldEntryin class- MapEvent<K,- V> 
- Returns:
- a Map Entry representing the pre-event state of the Entry
 
- 
getNewEntryReturn a Map Entry that represents the state of the Entry after the change occurred that generated this event.- Overrides:
- getNewEntryin class- MapEvent<K,- V> 
- Returns:
- a Map Entry representing the post-event state of the Entry
 
- 
getPartitionpublic int getPartition()Description copied from class:MapEventReturn the partition this MapEvent represents or -1 if the event source is not partition aware.- Overrides:
- getPartitionin class- MapEvent<K,- V> 
- Returns:
- the partition this MapEvent represents or -1 if the event source is not partition aware
 
- 
getVersionpublic long getVersion()Description copied from class:MapEventReturn the version that represents the change that caused this MapEvent. The meaning of this version, and therefore causality of versions, is defined by the event source.- Overrides:
- getVersionin class- MapEvent<K,- V> 
- Returns:
- the version that represents the change that caused this MapEvent
 
- 
isVersionUpdatepublic boolean isVersionUpdate()Description copied from class:CacheEventReturn true iff this event is caused by a synthetic version update sent by the server to notify clients of the current version.- Overrides:
- isVersionUpdatein class- CacheEvent<K,- V> 
- Returns:
- true iff this event is caused by a synthetic version update
 
- 
getMapEventReturn the underlying MapEvent.- Returns:
- the underlying MapEvent
 
- 
getContextGet the BackingMapManagerContext if one was provided.- Returns:
- the BackingMapManagerContext
 
- 
getConverterKeyUpReturn the Converter used to view the underlying MapEvent's key through.- Returns:
- the Converter from the underlying MapEvent's key
 
- 
getConverterValueUpReturn the Converter used to view the underlying MapEvent's value through.- Returns:
- the Converter from the underlying MapEvent's value
 
- 
setKeySet the cached converted old value associated with this event.- Parameters:
- key- the converted key value
 
- 
setOldValueSet the cached converted old value associated with this event.- Parameters:
- value- the new converted "old" value
 
- 
setNewValueSet the cached converted new value associated with this event.- Parameters:
- value- the new converted "new" value
 
- 
isKeyConvertedpublic boolean isKeyConverted()Check if the event's key has been converted.- Returns:
- true iff the key has been converted
 
- 
isOldValueConvertedpublic boolean isOldValueConverted()Check if the event's old value has been converted.- Returns:
- true iff the old value has been converted
 
- 
isNewValueConvertedpublic boolean isNewValueConverted()Check if the event's new value has been converted.- Returns:
- true iff the new value has been converted
 
- 
clearConvertedpublic void clearConverted()Remove any cached conversions of the key or values.
 
-