Oracle Coherence for C++ API
Release 3.6.1.0
E18813-01

- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# AbstractUpdater Class Reference

`#include <coherence/util/extractor/AbstractUpdater.hpp>`

Inherits Object, and ValueUpdater.

List of all members.

## Detailed Description

Abstract base for ValueUpdater implementations.

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.

Author:
  gg 2009.09.11

Since:
  Coherence 3.6

## 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. Parameters:
  | hTarget | the Object to update the state of
  | ohValue | the new value to update the state with
  Exceptions:
  | ClassCastException | if this ValueUpdater is incompatible with the passed target object or the value and the implementation requires the passed object or the value to be of a certain type
  | Exception | if this ValueUpdater encounters a checked exception in the course of updating the target object
  | IllegalArgumentException | if this ValueUpdater cannot handle the passed target object or value for any other reason; an implementor should include a descriptive message
virtual void | updateEntry (Map::Entry::Handle hEntry, Object::Holder ohValue) const
| Update the state of the passed entry using the passed value.

## Member Function Documentation

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.

Parameters:

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

The documentation for this class was generated from the following file:

- coherence/util/extractor/AbstractUpdater.hpp

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