Class Overview
A pessimistic locking strategy where the locks are obtained through select statements.
For non-read locks, this is achieved through the Dialect's specific
SELECT ... FOR UPDATE syntax.
This strategy is valid for LockMode.PESSIMISTIC_WRITE
This class is a clone of SelectLockingStrategy.
Public Constructors
public
PessimisticWriteSelectLockingStrategy
(Lockable lockable, LockMode lockMode)
Construct a locking strategy based on SQL SELECT statements.
Parameters
lockable
| The metadata for the entity to be locked. |
lockMode
| Indicates the type of lock to be acquired.
|
Public Methods
Protected Methods
protected
String
generateLockString
(int lockTimeout)