示例#1
0
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);
}
示例#2
0
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;
}
示例#3
0
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 );
}
示例#4
0
bool Config::mapObject( co::Object* object, const UUID& id,
                        const uint128_t& version )
{
    return mapObjectSync( mapObjectNB( object, id, version ));
}
示例#5
0
uint32_t ObjectStore::mapObjectNB( Object* object, const ObjectVersion& v )
{
    return mapObjectNB( object, v.identifier, v.version );
}