示例#1
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 );
}
示例#2
0
void Object::setID( const base::UUID& identifier )
{
    EQASSERT( !isAttached( ));
    EQASSERT( identifier.isGenerated( ));
    _id = identifier;
}