Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.util.extractor
Class PofUpdater

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
                  extended by com.tangosol.util.extractor.PofUpdater

All Implemented Interfaces:
PortableObject, ValueUpdater, java.io.Serializable

public class PofUpdater
extends AbstractUpdater
implements ValueUpdater, PortableObject

POF-based ValueUpdater implementation.

Since:
Coherence 3.5
Author:
as 2009.02.14

Constructor Summary
PofUpdater()
          Default constructor (necessary for the PortableObject interface).
PofUpdater(int iProp)
          Constructs a PofUpdater based on a property index.
PofUpdater(PofNavigator navigator)
          Constructs a PofUpdater based on a POF navigator.

 

Method Summary
 boolean equals(java.lang.Object o)
          Compare the PofUpdater with another object to determine equality.
 int hashCode()
          Determine a hash value for the PofUpdater object according to the general Object.hashCode() contract.
 void readExternal(PofReader in)
          Restore the contents of a user type instance by reading its state using the specified PofReader object.
 java.lang.String toString()
          Return a human-readable description for this PofUpdater.
 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 passed entry using the specified value.
 void writeExternal(PofWriter out)
          Save the contents of a POF user type instance by writing its state using the specified PofWriter object.

 

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

PofUpdater

public PofUpdater()
Default constructor (necessary for the PortableObject interface).

PofUpdater

public PofUpdater(int iProp)
Constructs a PofUpdater based on a property index.

This constructor is equivalent to:

   PofUpdater updater =
       new PofUpdater(new SimplePofPath(iProp));
 
Parameters:
iProp - property index

PofUpdater

public PofUpdater(PofNavigator navigator)
Constructs a PofUpdater based on a POF navigator.
Parameters:
navigator - POF navigator

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
Overrides:
update in class AbstractUpdater
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 passed entry using the specified value.

It is expected that this updater will only be used against POF-encoded entries implementing BinaryEntry interface.

Overrides:
updateEntry in class AbstractUpdater
Parameters:
entry - the entry to update
oValue - the new value to update the target's property with
Throws:
java.lang.UnsupportedOperationException - if the specified target object is not a POF-encoded BinaryEntry or the serializer is not a PofContext
PofNavigationException - if the property cannot be located (navigated to)

equals

public boolean equals(java.lang.Object o)
Compare the PofUpdater with another object to determine equality.
Returns:
true iff this PofUpdater and the passed object are equivalent PofUpdaters

hashCode

public int hashCode()
Determine a hash value for the PofUpdater object according to the general Object.hashCode() contract.
Returns:
an integer hash value for this PofUpdater object

toString

public java.lang.String toString()
Return a human-readable description for this PofUpdater.
Returns:
a String description of the PofUpdater

readExternal

public void readExternal(PofReader in)
                  throws java.io.IOException
Restore the contents of a user type instance by reading its state using the specified PofReader object.
Specified by:
readExternal in interface PortableObject
Parameters:
in - the PofReader from which to read the object's state
Throws:
java.io.IOException - if an I/O error occurs

writeExternal

public void writeExternal(PofWriter out)
                   throws java.io.IOException
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.
Specified by:
writeExternal in interface PortableObject
Parameters:
out - the PofWriter to which to write the object's state
Throws:
java.io.IOException - if an I/O error occurs

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.