The Volatility sheet of the Define Class dialog is displayed when you select the Volatility sheet of the dialog.
The Volatility sheet enables you to maintain the volatility of all instances of a class; that is, to optimize locking based on the frequency at which class instances are updated.
By default, class instances are volatile; that is, class instances are often updated. For details, see "
To maintain the volatility of all instances in the class
In the Instance Volatility group box, select the:
Stable option button if you want to specify that class instances are updated infrequently
Frozen option button if you want to specify that class instances are not updated
Acquiring shared locks for stable objects incurs much less overhead, at the expense of extra cost when acquiring an exclusive lock. However, as stable objects are updated infrequently, exclusive locks are not often required.
The main benefit of using frozen objects is for iterating collections. The implicit shared lock requests associated with iterating are ignored, avoiding the overhead that would otherwise be involved.
Click the OK button. Alternatively, click the Cancel button to abandon your selections.
You can also use the
Method | Description |
---|---|
|
Changes the volatility of a persistent object |
|
Makes the specified persistent object frozen |
|
Makes the specified persistent object stable |
|
Makes the specified persistent object volatile |
For details, see