Stream ID

Each stream within a store has a unique identity. This is the stream ID, encapsulated by an instance of the TStreamId class.

Stream IDs can be compared with each other; they can also be externalised and internalised. The ID of one stream can be externalised into another stream, and this lays the foundations for building networks of streams. The TStreamId class provides ExternalizeL() and InternalizeL() functions for this purpose.

A stream ID is a 32-bit number. 4 bits are reserved, which means that a store can contain up to 2 28 =256M streams. No guarantees are given about the value of a stream ID. In particular, IDs are not allocated in sequence. Each store format has its own method for allocating IDs, designed to make stream lookup efficient in the context of that store.

In the context of a given store, a stream can be opened by specifying its ID.

Note that KNullStreamId is a stream ID that is guaranteed not to exist. As the name suggests, it represents a NULL stream ID.