bool SlaveConfig::mapData(const uint128_t& initID) { LBASSERT(!_objects); _objects = new ObjectMap(*this, *getApplication()); const uint32_t request = mapObjectNB(_objects, initID, co::VERSION_OLDEST, getApplicationNode()); return mapObjectSync(request); }
bool Config::loadData( const eq::uint128_t& initDataID ) { if( !_initData.isAttached( )) { const uint32_t request = mapObjectNB( &_initData, initDataID, co::VERSION_OLDEST, getApplicationNode( )); if( !mapObjectSync( request )) return false; unmapObject( &_initData ); // data was retrieved, unmap immediately } else // appNode, _initData is registered already { LBASSERT( _initData.getID() == initDataID ); } return true; }
uint32_t ObjectStore::mapObjectNB( Object* object, const base::UUID& id, const uint128_t& version ) { EQ_TS_NOT_THREAD( _commandThread ); EQ_TS_NOT_THREAD( _receiverThread ); EQLOG( LOG_OBJECTS ) << "Mapping " << base::className( object ) << " to id " << id << " version " << version << std::endl; EQASSERT( object ); EQASSERT( !object->isAttached( )); EQASSERT( !object->isMaster( )); EQASSERT( !_localNode->inCommandThread( )); EQASSERTINFO( id.isGenerated(), id ); object->notifyAttach(); if( !id.isGenerated( )) return EQ_UNDEFINED_UINT32; NodePtr master = _connectMaster( id ); EQASSERT( master ); return mapObjectNB( object, id, version, master ); }
bool Config::mapObject( co::Object* object, const UUID& id, const uint128_t& version ) { return mapObjectSync( mapObjectNB( object, id, version )); }
uint32_t ObjectStore::mapObjectNB( Object* object, const ObjectVersion& v ) { return mapObjectNB( object, v.identifier, v.version ); }