Top Description Fields Constructors Methods
org.eclipse.persistence.descriptors

public Class PessimisticLockingPolicy

extends Object
implements Cloneable, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.lang.Cloneable
Imports
org.eclipse.persistence.queries.ObjectLevelReadQuery, org.eclipse.persistence.exceptions.ValidationException

Description: This policy is used to configure bean level pessimistic locking feature. It is set on the CMPPolicy instance of the ClassDescriptor Note that bean is not pessimistic locked in the following scenarios:

Responsibilities:

Since
TopLink 10.1.3
See Also
org.eclipse.persistence.descriptors.CMPPolicy

Field Summary

Modifier and TypeField and Description
protected short

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.lang.Object.clone.

INTERNAL: Clone the policy
public short

Returns:

short locking mode value of ObjectLevelReadQuery.LOCK or ObjectLevelReadQuery.LOCK_NOWAIT
getLockingMode
()

PUBLIC: Return locking mode.

public void
setLockingMode(short
must be value of ObjectLevelReadQuery.LOCK or ObjectLevelReadQuery.LOCK_NOWAIT
mode
)

PUBLIC: Set locking mode.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lockingModeback to summary
protected short lockingMode

Constructor Detail

PessimisticLockingPolicyback to summary
public PessimisticLockingPolicy()

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

INTERNAL: Clone the policy

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
getLockingModeback to summary
public short getLockingMode()

PUBLIC: Return locking mode. Default locking mode is ObjectLevelReadQuery.LOCK.

Returns:short

short locking mode value of ObjectLevelReadQuery.LOCK or ObjectLevelReadQuery.LOCK_NOWAIT

setLockingModeback to summary
public void setLockingMode(short mode)

PUBLIC: Set locking mode. If the mode is not a valid value, the locking mode is unchanged.

Parameters
mode:short

must be value of ObjectLevelReadQuery.LOCK or ObjectLevelReadQuery.LOCK_NOWAIT