Collage  1.0.1
Object-Oriented C++ Network Library
Public Member Functions | Protected Member Functions | List of all members
co::ObjectHandler Class Referenceabstract

Interface for entities which map and register objects. More...

#include <objectHandler.h>

+ Inheritance diagram for co::ObjectHandler:

Public Member Functions

virtual bool registerObject (Object *object)=0
 Register a distributed object. More...
 
virtual void deregisterObject (Object *object)=0
 Deregister a distributed object. More...
 
virtual uint32_t mapObjectNB (Object *object, const UUID &id, const uint128_t &version, NodePtr master)=0
 Start mapping a distributed object. More...
 
virtual bool mapObjectSync (const uint32_t requestID)=0
 Finalize the mapping of a distributed object. More...
 
virtual void unmapObject (Object *object)=0
 Unmap a mapped object. More...
 
CO_API void releaseObject (Object *object)
 Convenience method to deregister or unmap an object. More...
 

Protected Member Functions

 ObjectHandler ()
 Construct a new object handler. More...
 
virtual ~ObjectHandler ()
 Destroy this object handler. More...
 

Detailed Description

Interface for entities which map and register objects.

Definition at line 29 of file objectHandler.h.

Constructor & Destructor Documentation

co::ObjectHandler::ObjectHandler ( )
inlineprotected

Construct a new object handler.

Version
1.0

Definition at line 79 of file objectHandler.h.

virtual co::ObjectHandler::~ObjectHandler ( )
inlineprotectedvirtual

Destroy this object handler.

Version
1.0

Definition at line 82 of file objectHandler.h.

Member Function Documentation

virtual void co::ObjectHandler::deregisterObject ( Object object)
pure virtual

Deregister a distributed object.

Parameters
objectthe object instance.
Version
1.0

Implemented in co::LocalNode.

virtual uint32_t co::ObjectHandler::mapObjectNB ( Object object,
const UUID &  id,
const uint128_t &  version,
NodePtr  master 
)
pure virtual

Start mapping a distributed object.

Parameters
objectthe object to map.
idthe object identifier
versionthe version to map.
masterthe 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
objectthe 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 void co::ObjectHandler::unmapObject ( Object object)
pure virtual

Unmap a mapped object.

Version
1.0

Implemented in co::LocalNode.


The documentation for this class was generated from the following file: