An object change manager handling changes for versioned slave instances. More...
#include <versionedSlaveCM.h>


Public Member Functions | |
| VersionedSlaveCM (Object *object, uint32_t masterInstanceID) | |
| virtual void | makeThreadSafe () |
| Make this object thread safe. | |
| virtual bool | isMaster () const |
| virtual uint32_t | getMasterInstanceID () const |
| virtual uint32_t | addSlave (Command &command) |
| 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. | |
| virtual void | addInstanceDatas (const InstanceDataDeque &cache, const uint32_t startVersion) |
| Add existing instance data to the object (from session cache). | |
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 |
An object change manager handling changes for versioned slave instances.
Definition at line 37 of file versionedSlaveCM.h.
| void eq::net::VersionedSlaveCM::makeThreadSafe | ( | ) | [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.
Implements eq::net::ObjectCM.
Definition at line 67 of file versionedSlaveCM.cpp.
| virtual uint32_t eq::net::VersionedSlaveCM::commitNB | ( | ) | [inline, virtual] |
Start committing a new version.
Implements eq::net::ObjectCM.
Definition at line 49 of file versionedSlaveCM.h.
| virtual uint32_t eq::net::VersionedSlaveCM::commitSync | ( | const uint32_t | commitID | ) | [inline, virtual] |
Finalize a commit transaction.
| commitID | the commit identifier returned from commitNB |
Implements eq::net::ObjectCM.
Definition at line 50 of file versionedSlaveCM.h.
| virtual void eq::net::VersionedSlaveCM::obsolete | ( | const uint32_t | version | ) | [inline, virtual] |
Explicitily obsolete all versions.
| version | the version to obsolete |
Implements eq::net::ObjectCM.
Definition at line 53 of file versionedSlaveCM.h.
| virtual void eq::net::VersionedSlaveCM::setAutoObsolete | ( | const uint32_t | count, | |
| const uint32_t | flags | |||
| ) | [inline, virtual] |
Automatically obsolete old versions.
| 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 55 of file versionedSlaveCM.h.
| virtual uint32_t eq::net::VersionedSlaveCM::getAutoObsoleteCount | ( | ) | const [inline, virtual] |
Implements eq::net::ObjectCM.
Definition at line 57 of file versionedSlaveCM.h.
| uint32_t eq::net::VersionedSlaveCM::sync | ( | const uint32_t | version | ) | [virtual] |
Sync to a given version.
| version | the version to synchronize, must be bigger than the current version. |
Implements eq::net::ObjectCM.
Definition at line 75 of file versionedSlaveCM.cpp.
References EQLOG, eq::net::Object::getID(), eq::net::Object::getInstanceID(), eq::net::Object::getLocalNode(), eq::base::RefPtr< T >::isValid(), and eq::base::MTQueue< T >::pop().

| uint32_t eq::net::VersionedSlaveCM::getHeadVersion | ( | ) | const [virtual] |
Implements eq::net::ObjectCM.
Definition at line 135 of file versionedSlaveCM.cpp.
References eq::base::MTQueue< T >::getBack().

| virtual uint32_t eq::net::VersionedSlaveCM::getVersion | ( | ) | const [inline, virtual] |
Implements eq::net::ObjectCM.
Definition at line 63 of file versionedSlaveCM.h.
| virtual uint32_t eq::net::VersionedSlaveCM::getOldestVersion | ( | ) | const [inline, virtual] |
Implements eq::net::ObjectCM.
Definition at line 64 of file versionedSlaveCM.h.
| virtual bool eq::net::VersionedSlaveCM::isMaster | ( | ) | const [inline, virtual] |
Implements eq::net::ObjectCM.
Definition at line 67 of file versionedSlaveCM.h.
| virtual uint32_t eq::net::VersionedSlaveCM::getMasterInstanceID | ( | ) | const [inline, virtual] |
Implements eq::net::ObjectCM.
Definition at line 68 of file versionedSlaveCM.h.
| virtual uint32_t eq::net::VersionedSlaveCM::addSlave | ( | Command & | command | ) | [inline, virtual] |
Add a subscribed slave to the managed object.
| command | the subscribe command initiating the add. |
Implements eq::net::ObjectCM.
Definition at line 70 of file versionedSlaveCM.h.
| virtual void eq::net::VersionedSlaveCM::removeSlave | ( | NodePtr | node | ) | [inline, virtual] |
Remove a subscribed slave.
| node | the slave node. |
Implements eq::net::ObjectCM.
Definition at line 72 of file versionedSlaveCM.h.
| virtual void eq::net::VersionedSlaveCM::addOldMaster | ( | NodePtr | node, | |
| const uint32_t | instanceID | |||
| ) | [inline, virtual] |
Add the old master as a slave.
Implements eq::net::ObjectCM.
Definition at line 73 of file versionedSlaveCM.h.
| void eq::net::VersionedSlaveCM::applyMapData | ( | ) | [virtual] |
Apply the initial data after mapping.
Implements eq::net::ObjectCM.
Definition at line 173 of file versionedSlaveCM.cpp.
References eq::net::Object::applyInstanceData(), EQLOG, EQWARN, eq::net::Object::getID(), eq::net::Object::getInstanceID(), eq::net::DataIStream::getRemainingBufferSize(), eq::net::ObjectDataIStream::nRemainingBuffers(), and eq::base::MTQueue< T >::pop().

0.9.1 by
1.6.1