eq::net::ObjectCM Class Reference

The object change manager base class. More...

#include <objectCM.h>

Inheritance diagram for eq::net::ObjectCM:

Inheritance graph
[legend]
Collaboration diagram for eq::net::ObjectCM:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ObjectCM ()
 Construct a new change manager.
virtual void makeThreadSafe ()=0
 Make this object thread safe.
virtual bool isMaster () const =0
virtual uint32_t getMasterInstanceID () const =0
virtual void addSlave (NodePtr node, const uint32_t instanceID, const uint32_t version)=0
 Add a subscribed slave to the managed object.
virtual void removeSlave (NodePtr node)=0
 Remove a subscribed slave.
virtual void applyMapData ()=0
 Apply the initial data after mapping.
virtual void addOldMaster (NodePtr node, const uint32_t instanceID)=0
 Add the old master as a slave.
Versioning
virtual uint32_t commitNB ()=0
 Start committing a new version.
virtual uint32_t commitSync (const uint32_t commitID)=0
 Finalize a commit transaction.
virtual void obsolete (const uint32_t version)=0
 Explicitily obsolete all versions.
virtual void setAutoObsolete (const uint32_t count, const uint32_t flags)=0
 Automatically obsolete old versions.
virtual uint32_t getAutoObsoleteCount () const =0
virtual uint32_t sync (const uint32_t version)=0
 Sync to a given version.
virtual uint32_t getHeadVersion () const =0
virtual uint32_t getVersion () const =0
virtual uint32_t getOldestVersion () const =0

Static Public Attributes

static ObjectCMZERO = new eq::net::NullCM
 The default CM for unattached objects.


Detailed Description

The object change manager base class.

Each object has a change manager to create and store version information. The type of change manager depends on the object implementation, and if it is the master object or a slave object.

For internal use only.

Definition at line 39 of file objectCM.h.


Constructor & Destructor Documentation

eq::net::ObjectCM::ObjectCM (  )  [inline]

Construct a new change manager.

Definition at line 43 of file objectCM.h.


Member Function Documentation

virtual void eq::net::ObjectCM::makeThreadSafe (  )  [pure virtual]

Make this object thread safe.

The caller has to ensure that no other thread is using this object when this function is called. It is primarily used by the session during object instantiation.

See also:
Session::getObject().

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::makeThreadSafe().

Here is the caller graph for this function:

virtual uint32_t eq::net::ObjectCM::commitNB (  )  [pure virtual]

Start committing a new version.

Returns:
the commit identifier to be passed to commitSync
See also:
commitSync

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::commitNB().

Here is the caller graph for this function:

virtual uint32_t eq::net::ObjectCM::commitSync ( const uint32_t  commitID  )  [pure virtual]

Finalize a commit transaction.

Parameters:
commitID the commit identifier returned from commitNB
Returns:
the new head version.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::commitSync().

Here is the caller graph for this function:

virtual void eq::net::ObjectCM::obsolete ( const uint32_t  version  )  [pure virtual]

Explicitily obsolete all versions.

Parameters:
version the version to obsolete

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::obsolete().

Here is the caller graph for this function:

virtual void eq::net::ObjectCM::setAutoObsolete ( const uint32_t  count,
const uint32_t  flags 
) [pure virtual]

Automatically obsolete old versions.

Parameters:
count the number of versions to retain, excluding the head version.
flags additional flags for the auto-obsoletion mechanism

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::setAutoObsolete().

Here is the caller graph for this function:

virtual uint32_t eq::net::ObjectCM::getAutoObsoleteCount (  )  const [pure virtual]

Returns:
get the number of versions this object retains.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::getAutoObsoleteCount().

Here is the caller graph for this function:

virtual uint32_t eq::net::ObjectCM::sync ( const uint32_t  version  )  [pure virtual]

Sync to a given version.

Parameters:
version the version to synchronize, must be bigger than the current version.
Returns:
the version of the object after the operation.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::sync().

Here is the caller graph for this function:

virtual uint32_t eq::net::ObjectCM::getHeadVersion (  )  const [pure virtual]

Returns:
the latest available (head) version.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::getHeadVersion().

Here is the caller graph for this function:

virtual uint32_t eq::net::ObjectCM::getVersion (  )  const [pure virtual]

Returns:
the current version.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::getVersion().

Here is the caller graph for this function:

virtual uint32_t eq::net::ObjectCM::getOldestVersion (  )  const [pure virtual]

Returns:
the oldest available version.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::getOldestVersion().

Here is the caller graph for this function:

virtual bool eq::net::ObjectCM::isMaster (  )  const [pure virtual]

Returns:
if this instance is the master version.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::isMaster().

Here is the caller graph for this function:

virtual uint32_t eq::net::ObjectCM::getMasterInstanceID (  )  const [pure virtual]

Returns:
the instance identifier of the master object.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::getMasterInstanceID().

Here is the caller graph for this function:

virtual void eq::net::ObjectCM::addSlave ( NodePtr  node,
const uint32_t  instanceID,
const uint32_t  version 
) [pure virtual]

Add a subscribed slave to the managed object.

Parameters:
node the slave node.
instanceID the object instance identifier on the slave node.
version the initial version.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::addSlave().

Here is the caller graph for this function:

virtual void eq::net::ObjectCM::removeSlave ( NodePtr  node  )  [pure virtual]

Remove a subscribed slave.

Parameters:
node the slave node.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::removeSlave().

Here is the caller graph for this function:

virtual void eq::net::ObjectCM::applyMapData (  )  [pure virtual]

virtual void eq::net::ObjectCM::addOldMaster ( NodePtr  node,
const uint32_t  instanceID 
) [pure virtual]

Add the old master as a slave.

Implemented in eq::net::DeltaMasterCM, eq::net::FullMasterCM, eq::net::FullSlaveCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, and eq::net::UnbufferedMasterCM.

Referenced by eq::net::Object::becomeMaster().

Here is the caller graph for this function:


Member Data Documentation

The default CM for unattached objects.

Definition at line 145 of file objectCM.h.

Referenced by eq::net::Object::detachFromSession(), and eq::net::Object::~Object().


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8