The object change manager base class. More...
#include <objectCM.h>


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 uint32_t | addSlave (Command &command)=0 |
| Add a subscribed slave to the managed object. | |
| virtual void | removeSlave (NodePtr node)=0 |
| Remove a subscribed slave. | |
| virtual const NodeVector * | getSlaveNodes () const |
| virtual void | applyMapData ()=0 |
| Apply the initial data after mapping. | |
| virtual void | addInstanceDatas (const InstanceDataDeque &cache, const uint32_t startVersion) |
| Add existing instance data to the object (from session cache). | |
| 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 ObjectCM * | ZERO = new eq::net::NullCM |
| The default CM for unattached objects. | |
Static Protected Attributes | |
| static base::a_int32_t | _hit |
| static base::a_int32_t | _miss |
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 44 of file objectCM.h.
| eq::net::ObjectCM::ObjectCM | ( | ) | [inline] |
Construct a new change manager.
Definition at line 48 of file objectCM.h.
| 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.
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::makeThreadSafe().

| virtual uint32_t eq::net::ObjectCM::commitNB | ( | ) | [pure virtual] |
Start committing a new version.
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::commitNB().

| virtual uint32_t eq::net::ObjectCM::commitSync | ( | const uint32_t | commitID | ) | [pure virtual] |
Finalize a commit transaction.
| commitID | the commit identifier returned from commitNB |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::commitSync().

| virtual void eq::net::ObjectCM::obsolete | ( | const uint32_t | version | ) | [pure virtual] |
Explicitily obsolete all versions.
| version | the version to obsolete |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::obsolete().

| virtual void eq::net::ObjectCM::setAutoObsolete | ( | const uint32_t | count, | |
| const uint32_t | flags | |||
| ) | [pure virtual] |
Automatically obsolete old versions.
| count | the number of versions to retain, excluding the head version. | |
| flags | additional flags for the auto-obsoletion mechanism |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::setAutoObsolete().

| virtual uint32_t eq::net::ObjectCM::getAutoObsoleteCount | ( | ) | const [pure virtual] |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::getAutoObsoleteCount().

| virtual uint32_t eq::net::ObjectCM::sync | ( | const uint32_t | version | ) | [pure virtual] |
Sync to a given version.
| version | the version to synchronize, must be bigger than the current version. |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::sync().

| virtual uint32_t eq::net::ObjectCM::getHeadVersion | ( | ) | const [pure virtual] |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::getHeadVersion().

| virtual uint32_t eq::net::ObjectCM::getVersion | ( | ) | const [pure virtual] |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::getVersion().

| virtual uint32_t eq::net::ObjectCM::getOldestVersion | ( | ) | const [pure virtual] |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::getOldestVersion().

| virtual bool eq::net::ObjectCM::isMaster | ( | ) | const [pure virtual] |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::isMaster().

| virtual uint32_t eq::net::ObjectCM::getMasterInstanceID | ( | ) | const [pure virtual] |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::getMasterInstanceID().

| virtual uint32_t eq::net::ObjectCM::addSlave | ( | Command & | command | ) | [pure virtual] |
Add a subscribed slave to the managed object.
| command | the subscribe command initiating the add. |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
| virtual void eq::net::ObjectCM::removeSlave | ( | NodePtr | node | ) | [pure virtual] |
Remove a subscribed slave.
| node | the slave node. |
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::removeSlave().

| virtual const NodeVector* eq::net::ObjectCM::getSlaveNodes | ( | ) | const [inline, virtual] |
Reimplemented in eq::net::FullMasterCM, and eq::net::UnbufferedMasterCM.
Definition at line 142 of file objectCM.h.
| virtual void eq::net::ObjectCM::applyMapData | ( | ) | [pure virtual] |
Apply the initial data after mapping.
Implemented in eq::net::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
| 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::FullMasterCM, eq::net::NullCM, eq::net::StaticMasterCM, eq::net::StaticSlaveCM, eq::net::UnbufferedMasterCM, and eq::net::VersionedSlaveCM.
Referenced by eq::net::Object::becomeMaster().

eq::net::ObjectCM * eq::net::ObjectCM::ZERO = new eq::net::NullCM [static] |
The default CM for unattached objects.
Definition at line 156 of file objectCM.h.
Referenced by eq::net::Session::deregisterObject(), and eq::net::Object::~Object().
0.9.1 by
1.6.1