Product Information > JADE Development Environment User’s Guide > Chapter 3 - Defining Classes in Your Own Schema > Maintaining Class Instance Volatility

Maintaining Class Instance Volatility

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 "Cache Concurrency", in Chapter 6 of the JADE Developer's Reference.

To maintain the volatility of all instances in the class

  1. In the Instance Volatility group box, select the:

    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.

  2. Click the OK button. Alternatively, click the Cancel button to abandon your selections.

You can also use the Object class methods summarized in the following table to define the volatility state of a specific object.

Method Description
changeObjectVolatility Changes the volatility of a persistent object
makeObjectFrozen Makes the specified persistent object frozen
makeObjectStable Makes the specified persistent object stable
makeObjectVolatile Makes the specified persistent object volatile

For details, see Volume 2 of the JADE Encyclopaedia of Classes.