EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.descriptors
Class PessimisticLockingPolicy

java.lang.Object
  extended by org.eclipse.persistence.descriptors.PessimisticLockingPolicy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class PessimisticLockingPolicy
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

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:

See Also:
CMPPolicy, Serialized Form
Since:
TopLink 10.1.3

Field Summary
protected  short lockingMode
           
 
Constructor Summary
PessimisticLockingPolicy()
           
 
Method Summary
 java.lang.Object clone()
          INTERNAL: Clone the policy
 short getLockingMode()
          PUBLIC: Return locking mode.
 void setLockingMode(short mode)
          PUBLIC: Set locking mode.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lockingMode

protected short lockingMode
Constructor Detail

PessimisticLockingPolicy

public PessimisticLockingPolicy()
Method Detail

getLockingMode

public short getLockingMode()
PUBLIC: Return locking mode. Default locking mode is ObjectLevelReadQuery.LOCK.

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

setLockingMode

public void setLockingMode(short mode)
PUBLIC: Set locking mode. If the mode is not a valid value, the locking mode is unchanged.

Parameters:
short - mode must be value of ObjectLevelReadQuery.LOCK or ObjectLevelReadQuery.LOCK_NOWAIT

clone

public java.lang.Object clone()
INTERNAL: Clone the policy

Overrides:
clone in class java.lang.Object

EclipseLink 2.2.0, build 'v20110202-r8913' API Reference