changeObjectVolatility

changeObjectVolatility(object:      Object;
                       volatility:  Integer;
                       conditional: Boolean);

The changeObjectVolatility method of the Object class changes the volatility state of the persistent object specified in the object parameter. (You can change the volatility state only of persistent objects. All transient objects are considered volatile.) For details, see "Cache Concurrency", in Chapter 6 of the Developer's Reference.

Use the volatility parameter to specify the volatility state that you require, represented by one of the following global constants in the ObjectVolatility category.

Global Constant Integer Value Description
Volatility_Frozen #04 Object is frozen (that is, it is not updated)
Volatility_Stable #08 Object is stable (that is, it is updated infrequently)
Volatility_Volatile #00 Object is volatile (that is, it is updated often)

As object volatility state is conditional by default, a frozen object can be updated only by first changing its volatility to Volatility_Stable or Volatility_Volatile.

Use the conditional parameter to specify whether the change is conditional or unconditional. Set the value of this parameter to:

See the makeObjectStable or makeObjectVolatile method for an equivalent way to conditionally change the volatility of an object.