com.tc.object.applicator
Interface ChangeApplicator

All Known Implementing Classes:
BaseApplicator

public interface ChangeApplicator

Applies a serialized change to an object.


Method Summary
 void dehydrate(ApplicatorObjectManager objectManager, TCObjectExternal tcObject, DNAWriter writer, java.lang.Object pojo)
          Write an object's state to DNA
 java.lang.Object getNewInstance(ApplicatorObjectManager objectManager, DNA dna)
          Instantiate a new instance of the object from DNA.
 TraversedReferences getPortableObjects(java.lang.Object pojo, TraversedReferences addTo)
          Traverse an object and find all object references within it.
 void hydrate(ApplicatorObjectManager objectManager, TCObjectExternal tcObject, DNA dna, java.lang.Object pojo)
          Reconstitute the state of an object from DNA.
 

Method Detail

hydrate

void hydrate(ApplicatorObjectManager objectManager,
             TCObjectExternal tcObject,
             DNA dna,
             java.lang.Object pojo)
             throws java.io.IOException,
                    java.lang.ClassNotFoundException
Reconstitute the state of an object from DNA.

Parameters:
objectManager - The client-side object manager
tcObject - The manager for the object
dna - The DNA, representing the state of the object
pojo - A new instance of the object to reconstitute - this object will be modified with the values from the DNA
Throws:
java.io.IOException
java.lang.ClassNotFoundException

dehydrate

void dehydrate(ApplicatorObjectManager objectManager,
               TCObjectExternal tcObject,
               DNAWriter writer,
               java.lang.Object pojo)
Write an object's state to DNA

Parameters:
objectManager - The client-side object manager
tcObject - The manager for the object
writer - The DNA writer for writing the DNA
pojo - The object to write to writer

getPortableObjects

TraversedReferences getPortableObjects(java.lang.Object pojo,
                                       TraversedReferences addTo)
Traverse an object and find all object references within it.

Parameters:
pojo - The object instance
addTo - A collection of traversed references found
Returns:
The addTo collection

getNewInstance

java.lang.Object getNewInstance(ApplicatorObjectManager objectManager,
                                DNA dna)
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException
Instantiate a new instance of the object from DNA. May not be supported on all applicators.

Parameters:
objectManager - The client-side object manager
dna - The DNA for the new object
Returns:
The new instance
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.