Freeze levels

Sometimes streaming an object is referred to as freezing it in a given state. Three different levels of object freezing are supported depending on whether you intend simply to share data among several threads in a task (same team, same address space), among different applications (different address spaces) during a single work session (same session), to other machines across networks, or beyond the life of a given machine session as in permanent data files saved by application programs.

The deeper the freeze level, the more permanent the object. It follows that a deeper freeze level implies that more information must be written to the persistent stream as less context will be available when objects are reinstantiated from the stream. In general you should select the most shallow freeze level acceptable for a given application to get the maximum possible performance.

The three freeze levels are represented as enumerations defined in the TStream class.

        enum FreezeLevel { kSameTeam, kSameSession, kDeepFreeze };
The freeze levels listed in the enumeration are listed in order of the least to the most complex in terms of the amount of information preserved and restored.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker