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.extractor
Class AbstractUpdater

`java.lang.Object
com.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.util.extractor.AbstractUpdater`

All Implemented Interfaces:
  ValueUpdater, Serializable

Direct Known Subclasses:
  PofUpdater, ReflectionUpdater

      public abstract class AbstractUpdater

extends ExternalizableHelper
implements ValueUpdater, Serializable

Abstract base for ValueUpdater implementations. <p/> 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. <p/> Note: subclasses are responsible for POF and/or Lite serialization of the updater.

Since:
  Coherence 3.6
Author:
  gg 2009.09.11

Constructor Summary
`AbstractUpdater()`

Method Summary
`void` | `update(Object oTarget, Object oValue)` Update the state of the passed target object using the passed value.
`void` | `updateEntry(Map.Entry entry, Object oValue)` Update the state of the passed entry using the passed value.

Methods inherited from class com.tangosol.util.BitHelper
`countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString`

Constructor Detail

### AbstractUpdater

    public AbstractUpdater()

Method Detail

### update

    public void update(Object oTarget,
                       Object oValue)

  Update the state of the passed target object using the passed value. For intrinsic types, the specified value is expected to be a standard wrapper type in the same manner that reflection works; for example, an `int` value would be passed as a `java.lang.Integer`.
  Specified by:
    `update` in interface `ValueUpdater`
  Parameters:
    `oTarget` - the Object to update the state of
    `oValue` - the new value to update the state with

### updateEntry

    public void updateEntry(Map.Entry entry,
                            Object oValue)

  Update the state of the passed entry using the passed value. <p/> 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:
    `entry` - the Entry object whose value is to be updated
    `oValue` - 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 java.lang.Integer)

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.