eq::net::FullMasterCM Class Reference

An object change manager handling only full versions for the master instance. More...

#include <fullMasterCM.h>

Inheritance diagram for eq::net::FullMasterCM:

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

Collaboration graph
[legend]

List of all members.

Classes

struct  DeltaData

Public Member Functions

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


Detailed Description

An object change manager handling only full versions for the master instance.

For internal use only.

Definition at line 39 of file fullMasterCM.h.


Member Function Documentation

virtual void eq::net::FullMasterCM::makeThreadSafe (  )  [inline, 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().

Implements eq::net::ObjectCM.

Definition at line 45 of file fullMasterCM.h.

uint32_t eq::net::FullMasterCM::commitNB (  )  [virtual]

Start committing a new version.

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

Implements eq::net::ObjectCM.

Definition at line 87 of file fullMasterCM.cpp.

References eq::net::Object::_instanceID, eq::net::Object::getChangeType(), eq::net::Object::getLocalNode(), eq::net::Object::INSTANCE, eq::base::RequestHandler::registerRequest(), and eq::net::Object::send().

Here is the call graph for this function:

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

Finalize a commit transaction.

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

Implements eq::net::ObjectCM.

Definition at line 100 of file fullMasterCM.cpp.

References eq::base::RequestHandler::waitRequest().

Here is the call graph for this function:

virtual void eq::net::FullMasterCM::obsolete ( const uint32_t  version  )  [inline, virtual]

Explicitily obsolete all versions.

Parameters:
version the version to obsolete

Implements eq::net::ObjectCM.

Definition at line 54 of file fullMasterCM.h.

virtual void eq::net::FullMasterCM::setAutoObsolete ( const uint32_t  count,
const uint32_t  flags 
) [inline, 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

Implements eq::net::ObjectCM.

Definition at line 56 of file fullMasterCM.h.

virtual uint32_t eq::net::FullMasterCM::getAutoObsoleteCount (  )  const [inline, virtual]

Returns:
get the number of versions this object retains.

Implements eq::net::ObjectCM.

Definition at line 60 of file fullMasterCM.h.

virtual uint32_t eq::net::FullMasterCM::sync ( const uint32_t  version  )  [inline, 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.

Implements eq::net::ObjectCM.

Definition at line 62 of file fullMasterCM.h.

virtual uint32_t eq::net::FullMasterCM::getHeadVersion (  )  const [inline, virtual]

Returns:
the latest available (head) version.

Implements eq::net::ObjectCM.

Definition at line 65 of file fullMasterCM.h.

virtual uint32_t eq::net::FullMasterCM::getVersion (  )  const [inline, virtual]

Returns:
the current version.

Implements eq::net::ObjectCM.

Definition at line 66 of file fullMasterCM.h.

uint32_t eq::net::FullMasterCM::getOldestVersion (  )  const [virtual]

Returns:
the oldest available version.

Implements eq::net::ObjectCM.

Definition at line 132 of file fullMasterCM.cpp.

Referenced by addSlave().

Here is the caller graph for this function:

virtual bool eq::net::FullMasterCM::isMaster (  )  const [inline, virtual]

Returns:
if this instance is the master version.

Implements eq::net::ObjectCM.

Definition at line 70 of file fullMasterCM.h.

virtual uint32_t eq::net::FullMasterCM::getMasterInstanceID (  )  const [inline, virtual]

Returns:
the instance identifier of the master object.

Implements eq::net::ObjectCM.

Definition at line 71 of file fullMasterCM.h.

void eq::net::FullMasterCM::addSlave ( NodePtr  node,
const uint32_t  instanceID,
const uint32_t  version 
) [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.

Implements eq::net::ObjectCM.

Definition at line 140 of file fullMasterCM.cpp.

References eq::net::Object::_id, EQLOG, eq::net::Object::getChangeType(), eq::base::Buffer< T >::getData(), getOldestVersion(), eq::base::Buffer< T >::getSize(), eq::net::Object::INSTANCE, and eq::net::Object::send().

Here is the call graph for this function:

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

Remove a subscribed slave.

Parameters:
node the slave node.

Implements eq::net::ObjectCM.

Definition at line 203 of file fullMasterCM.cpp.

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

Add the old master as a slave.

Implements eq::net::ObjectCM.

Definition at line 222 of file fullMasterCM.cpp.

References eq::net::Object::send().

Here is the call graph for this function:

virtual void eq::net::FullMasterCM::applyMapData (  )  [inline, virtual]

Apply the initial data after mapping.

Implements eq::net::ObjectCM.

Definition at line 78 of file fullMasterCM.h.


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