#include <fullSlaveCM.h>


Public Member Functions | |
| FullSlaveCM (Object *object, uint32_t masterInstanceID) | |
| virtual void | makeThreadSafe () |
| Make this object thread safe. | |
| virtual bool | isMaster () const |
| virtual uint32_t | getMasterInstanceID () const |
| virtual void | addSlave (NodePtr slave, 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 |
Protected Member Functions | |
| virtual void | _unpackOneVersion (ObjectDataIStream *is) |
| Apply the data in the input stream to the object. | |
Protected Attributes | |
| uint32_t | _version |
| The current version. | |
| base::MTQueue < ObjectDataIStream * > | _queuedVersions |
| The change queue. | |
Definition at line 39 of file fullSlaveCM.h.
| void eq::net::FullSlaveCM::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.
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 69 of file fullSlaveCM.cpp.
| virtual uint32_t eq::net::FullSlaveCM::commitNB | ( | ) | [inline, virtual] |
Start committing a new version.
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 51 of file fullSlaveCM.h.
| virtual uint32_t eq::net::FullSlaveCM::commitSync | ( | const uint32_t | commitID | ) | [inline, virtual] |
Finalize a commit transaction.
| commitID | the commit identifier returned from commitNB |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 52 of file fullSlaveCM.h.
| virtual void eq::net::FullSlaveCM::obsolete | ( | const uint32_t | version | ) | [inline, virtual] |
Explicitily obsolete all versions.
| version | the version to obsolete |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 55 of file fullSlaveCM.h.
| virtual void eq::net::FullSlaveCM::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 |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 57 of file fullSlaveCM.h.
| virtual uint32_t eq::net::FullSlaveCM::getAutoObsoleteCount | ( | ) | const [inline, virtual] |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 59 of file fullSlaveCM.h.
| uint32_t eq::net::FullSlaveCM::sync | ( | const uint32_t | version | ) | [virtual] |
Sync to a given version.
| version | the version to synchronize, must be bigger than the current version. |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 76 of file fullSlaveCM.cpp.
References eq::net::StaticSlaveCM::_object, _queuedVersions, _unpackOneVersion(), _version, EQLOG, eq::net::Object::getID(), eq::net::Object::getInstanceID(), eq::net::Object::getLocalNode(), eq::net::ObjectDataIStream::getVersion(), and eq::base::MTQueue< T >::pop().

| uint32_t eq::net::FullSlaveCM::getHeadVersion | ( | ) | const [virtual] |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 130 of file fullSlaveCM.cpp.
References _queuedVersions, _version, eq::base::MTQueue< T >::back(), and eq::net::ObjectDataIStream::getVersion().

| virtual uint32_t eq::net::FullSlaveCM::getVersion | ( | ) | const [inline, virtual] |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 65 of file fullSlaveCM.h.
References _version.
| virtual uint32_t eq::net::FullSlaveCM::getOldestVersion | ( | ) | const [inline, virtual] |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 66 of file fullSlaveCM.h.
References _version.
| virtual bool eq::net::FullSlaveCM::isMaster | ( | ) | const [inline, virtual] |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 69 of file fullSlaveCM.h.
| virtual uint32_t eq::net::FullSlaveCM::getMasterInstanceID | ( | ) | const [inline, virtual] |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 70 of file fullSlaveCM.h.
| virtual void eq::net::FullSlaveCM::addSlave | ( | NodePtr | node, | |
| const uint32_t | instanceID, | |||
| const uint32_t | version | |||
| ) | [inline, virtual] |
Add a subscribed slave to the managed object.
| node | the slave node. | |
| instanceID | the object instance identifier on the slave node. | |
| version | the initial version. |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 72 of file fullSlaveCM.h.
| virtual void eq::net::FullSlaveCM::removeSlave | ( | NodePtr | node | ) | [inline, virtual] |
Remove a subscribed slave.
| node | the slave node. |
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 74 of file fullSlaveCM.h.
| virtual void eq::net::FullSlaveCM::addOldMaster | ( | NodePtr | node, | |
| const uint32_t | instanceID | |||
| ) | [inline, virtual] |
Add the old master as a slave.
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 75 of file fullSlaveCM.h.
| void eq::net::FullSlaveCM::applyMapData | ( | ) | [virtual] |
Apply the initial data after mapping.
Reimplemented from eq::net::StaticSlaveCM.
Definition at line 157 of file fullSlaveCM.cpp.
References eq::net::StaticSlaveCM::_currentIStream, eq::net::StaticSlaveCM::_object, _version, eq::net::Object::applyInstanceData(), EQLOG, eq::net::Object::getID(), eq::net::Object::getInstanceID(), eq::net::ObjectDataIStream::getVersion(), and eq::net::ObjectDataIStream::waitReady().

uint32_t eq::net::FullSlaveCM::_version [protected] |
The current version.
Definition at line 82 of file fullSlaveCM.h.
Referenced by _unpackOneVersion(), applyMapData(), getHeadVersion(), getOldestVersion(), getVersion(), and sync().
base::MTQueue< ObjectDataIStream* > eq::net::FullSlaveCM::_queuedVersions [protected] |
The change queue.
Definition at line 85 of file fullSlaveCM.h.
Referenced by getHeadVersion(), and sync().
0.9 by
1.5.8