Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-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, 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(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.
 String toString()
          Return a human-readable description for this PofUpdater.
 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.
 void updateEntry(Map.Entry entry, 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. <p/> 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(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
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(Map.Entry entry,
                        Object oValue)
Update the passed entry using the specified value. <p/> 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:
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(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 String toString()
Return a human-readable description for this PofUpdater.
Returns:
a String description of the PofUpdater

readExternal

public void readExternal(PofReader in)
                  throws 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:
IOException - if an I/O error occurs

writeExternal

public void writeExternal(PofWriter out)
                   throws 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:
IOException - if an I/O error occurs

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


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