Skip Headers

# Configuring an Optimistic Locking Policy

Previous

Next

Use the `ClassDescriptor` method `setOptimisticLockingPolicy` to set an instance of the appropriate optimistic field locking policy:

- `FieldsLockingPolicy`

- `AllFieldsLockingPolicy`

- `ChangedFieldsLockingPolicy`

- `SelectedFieldsLockingPolicy`

- `VersionLockingPolicy`

- `TimestampLockingPolicy`

Use the `ClassDescriptor` method `getOptimisticLockingPolicy` to get the selected locking policy type and configure it.