OidSpaceMap

Each site stores its own persistent bijective map between 32 bit OID Space Identifier (OidHigh) and OidSpaceGuid. This allows the 160 bit (OidSpaceGuid,OidLow) to be locally represented as a correponding (OidHigh,OidLow) which is 64 bit and matches the OIDs used in the local LSS.

This limits a given site to 264 objects, taken from up to 232 different Oid Spaces.

Object identifiers are always stored and sent over the wire using 64 bit OIDs. However OIDs that are sent over the wire must be accompanied by (OidHigh,OidSpaceGuid) pairs. This allows the receiver to set up a mapping from remote OidHigh to local OidHigh, to allow OIDs to be translated. An (OidHigh,OidSpaceGuid) pair only needs to be sent at most once in a given session between two computers. Therefore this overhead can be minimised.


$class+ OidSpaceMap isa IPersistable
{
public:
    OidHigh GetOidHigh(const OidSpaceGuid& osg) const;
    bool GetOidSpaceGuid(OidHigh oh, OidSpaceGuid& osg) const;
    OidHigh GetOrCreateOidHigh(const OidSpaceGuid& osg);
    void Add(OidHigh oh, const OidSpaceGuid& osg);
private:
    [ implementation ]
};

OidHigh GetOidHigh(const OidSpaceGuid& osg) const

Get the OidHigh for the given OidSpaceGuid, or returns 0 if not found Assuming the OidSpaceMap is pinned in memory, doesn't require any lock on the CSpace since this class is protected with a mutex.


bool GetOidSpaceGuid(OidHigh oh, OidSpaceGuid& osg) const


OidHigh GetOrCreateOidHigh(const OidSpaceGuid& osg)

Never returns 0


void Add(OidHigh oh, const OidSpaceGuid& osg)