Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.3.0)

E80355-01

EvolvableObject Class Reference

#include <coherence/io/pof/EvolvableObject.hpp>

Inherits Object.

List of all members.


Detailed Description

Defines an interface that should be implemented by the classes that want to support evolution.

Author:
as 2013.04.24
Since:
12.2.1

Public Types

typedef spec::Handle Handle
 EvolvableObject Handle definition.
typedef spec::View View
 EvolvableObject View definition.
typedef spec::Holder Holder
 EvolvableObject Holder definition.

Public Member Functions

virtual Evolvable::View getEvolvable (int32_t nTypeId) const =0
 Return Evolvable holder object for the specified type id.
virtual Evolvable::Handle getEvolvable (int32_t nTypeId)=0
 Return Evolvable holder object for the specified type id.
virtual
EvolvableHolder::View 
getEvolvableHolder () const =0
 Return EvolvableHolder that can be used to store information about evolvable objects that are not known during deserialization.

Member Function Documentation

virtual Evolvable::View getEvolvable ( int32_t  nTypeId  )  const [pure virtual]

Return Evolvable holder object for the specified type id.

This method should only return Evolvable instance if the specified type id matches its own type id. Otherwise, it should delegate to the parent:

     // assuming type ID of this class is 1234
     FinalView<Evolvable> f_vEvolvable;
      ...
     // in constructor
     : f_vEvolvable(self(), SimpleEvolvable::create(IMPL_VERSION))
     ...
     Evolvable::View getEvolvable(int32_t nTypeId)
         {
         if (1234 == nTypeId)
             {
             return f_vEvolvable;
             }

         return super::getEvolvable(nTypeId);
         }
 

Parameters:
nTypeId type id to get Evolvable instance for
Returns:
Evolvable instance for the specified type id

virtual Evolvable::Handle getEvolvable ( int32_t  nTypeId  )  [pure virtual]

Return Evolvable holder object for the specified type id.

This method should only return Evolvable instance if the specified type id matches its own type id. Otherwise, it should delegate to the parent:

     // assuming type ID of this class is 1234
     FinalView<Evolvable> f_vEvolvable;
      ...
     // in constructor
     : f_vEvolvable(self(), SimpleEvolvable::create(IMPL_VERSION))
     ...
     Evolvable::Handle getEvolvable(int32_t nTypeId)
         {
         if (1234 == nTypeId)
             {
             return f_vEvolvable;
             }

         return super::getEvolvable(nTypeId);
         }
 

Parameters:
nTypeId type id to get Evolvable instance for
Returns:
Evolvable instance for the specified type id

virtual EvolvableHolder::View getEvolvableHolder (  )  const [pure virtual]

Return EvolvableHolder that can be used to store information about evolvable objects that are not known during deserialization.

For example, it is possible to evolve the class hierarchy by adding new classes at any level in the hierarchy. Normally this would cause a problem during deserialization on older clients that don't have new classes at all, but EvolvableHolder allows us to work around that issue and simply store type id to opaque binary value mapping within it.

Returns:
EvolvableHolder instance


The documentation for this class was generated from the following file:
Copyright © 2000, 2017, Oracle and/or its affiliates. All rights reserved.