Interface for entities which map and register objects.
More...
#include <objectHandler.h>
Interface for entities which map and register objects.
Definition at line 29 of file objectHandler.h.
co::ObjectHandler::ObjectHandler |
( |
| ) |
|
|
inlineprotected |
Construct a new object handler.
- Version
- 1.0
Definition at line 102 of file objectHandler.h.
virtual co::ObjectHandler::~ObjectHandler |
( |
| ) |
|
|
inlineprotectedvirtual |
virtual void co::ObjectHandler::deregisterObject |
( |
Object * |
object | ) |
|
|
pure virtual |
Deregister a distributed object.
- Parameters
-
object | the object instance. |
- Version
- 1.0
Implemented in co::LocalNode.
virtual uint32_t co::ObjectHandler::mapObjectNB |
( |
Object * |
object, |
|
|
const uint128_t & |
id, |
|
|
const uint128_t & |
version, |
|
|
NodePtr |
master |
|
) |
| |
|
pure virtual |
Start mapping a distributed object.
- Parameters
-
object | the object to map. |
id | the object identifier |
version | the version to map. |
master | the master node, may be invalid/0. |
- Returns
- the request identifier for mapObjectSync().
- Version
- 1.0
Implemented in co::LocalNode.
virtual bool co::ObjectHandler::mapObjectSync |
( |
const uint32_t |
requestID | ) |
|
|
pure virtual |
Finalize the mapping of a distributed object.
- Version
- 1.0
Implemented in co::LocalNode.
virtual bool co::ObjectHandler::registerObject |
( |
Object * |
object | ) |
|
|
pure virtual |
Register a distributed object.
Registering a distributed object makes this object the master version. The object's identifier is used to map slave instances of the object. Master versions of objects are typically writable and can commit new versions of the distributed object.
- Parameters
-
object | the object instance. |
- Returns
- true if the object was registered, false otherwise.
- Version
- 1.0
Implemented in co::LocalNode.
CO_API void co::ObjectHandler::releaseObject |
( |
Object * |
object | ) |
|
Convenience method to deregister or unmap an object.
- Version
- 1.0
virtual f_bool_t co::ObjectHandler::syncObject |
( |
Object * |
object, |
|
|
NodePtr |
master, |
|
|
const uint128_t & |
id, |
|
|
const uint32_t |
instanceID = CO_INSTANCE_ALL |
|
) |
| |
|
pure virtual |
Synchronize the local object with a remote object.
The object is synchronized to the newest version of the first attached object on the given master node matching the instanceID. No mapping is established. When no master node is given, connectObjectMaster() is used to find the node with the master instance. When CO_INSTANCE_ALL is given, the first instance is used. Before a successful return, applyInstanceData() is called on the calling thread to synchronize the given object.
- Parameters
-
object | The local object instance to synchronize. |
master | The node where the synchronizing object is attached. |
id | the object identifier. |
instanceID | the instance identifier of the synchronizing object. |
- Returns
- A lunchbox::Future which will deliver the success status of the operation on evaluation.
- Version
- 1.1.1
Implemented in co::LocalNode.
virtual void co::ObjectHandler::unmapObject |
( |
Object * |
object | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: