Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.util.extractor
Class AbstractUpdater

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

All Implemented Interfaces:
ValueUpdater, java.io.Serializable
Direct Known Subclasses:
PofUpdater, ReflectionUpdater

public abstract class AbstractUpdater
extends ExternalizableHelper
implements ValueUpdater, java.io.Serializable

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.

Since:
Coherence 3.6
Author:
gg 2009.09.11

Constructor Summary
AbstractUpdater()
           

 

Method Summary
 void update(java.lang.Object oTarget, java.lang.Object oValue)
          Update the state of the passed target object using the passed value.
 void updateEntry(java.util.Map.Entry entry, java.lang.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(java.lang.Object oTarget,
                   java.lang.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(java.util.Map.Entry entry,
                        java.lang.Object oValue)
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:
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

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


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