#include <coherence/util/extractor/AbstractUpdater.hpp>
Inherits Object, and ValueUpdater.
Starting with Coherence 3.6, when used to update information stored in a Map, subclasses have the additional ability to operate against the Map::Entry instead of just the value. This allows an updater implementation to update a desired value using all available information on the corresponding Map::Entry object and is intended to be used in advanced custom scenarios, when application code needs to look at both key and value at the same time or can make some very specific assumptions regarding to the implementation details of the underlying Entry object (e.g. BinaryEntry). To maintain full backwards compatibility, the default behavior remains to update the Value property of the Map.Entry.
Note: subclasses are responsible for POF and/or Lite serialization of the updater.
Public Types | ||||||||||||||||
typedef spec::Handle | Handle | |||||||||||||||
AbstractUpdater Handle definition. | ||||||||||||||||
typedef spec::View | View | |||||||||||||||
AbstractUpdater View definition. | ||||||||||||||||
typedef spec::Holder | Holder | |||||||||||||||
AbstractUpdater Holder definition. | ||||||||||||||||
Public Member Functions | ||||||||||||||||
virtual void | update (Object::Handle hTarget, Object::Holder ohValue) const | |||||||||||||||
Update the state of the passed target object using the passed value.
| ||||||||||||||||
virtual void | updateEntry (Map::Entry::Handle hEntry, Object::Holder ohValue) const | |||||||||||||||
Update the state of the passed entry using the passed value. |
virtual void updateEntry | ( | Map::Entry::Handle | hEntry, | |
Object::Holder | ohValue | |||
) | const [virtual] |
Update the state of the passed entry using the passed value.
By overriding this method, an updater implementation is able to update the entry's value using all available information on the corresponding Map::Entry object and is intended to be used in advanced custom scenarios, when application code needs to look at both key and value at the same time or can make some very specific assumptions regarding to the implementation details of the underlying Entry object.
hEntry | the Entry object whose value is to be updated | |
ohValue | the new value to update the entry with; for intrinsic types, the specified value is expected to be a standard wrapper type in the same manner that reflection works (e.g. an int value would be passed as a Integer32) |