Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion hibernate-core/src/main/java/org/hibernate/LockMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
*
* @see Session#lock(Object, LockMode)
* @see LockModeType
* @see LockOptions
* @see org.hibernate.annotations.OptimisticLocking
*/
public enum LockMode implements FindOption, RefreshOption {
Expand Down Expand Up @@ -119,7 +118,10 @@ public enum LockMode implements FindOption, RefreshOption {
* lock mode, if the lock is successfully obtained, are the same
* as {@link #PESSIMISTIC_WRITE}. If the lock is not immediately
* available, an exception occurs.
*
* @deprecated Use {@linkplain Timeouts#NO_WAIT} instead.
*/
@Deprecated
UPGRADE_NOWAIT,

/**
Expand All @@ -129,7 +131,10 @@ public enum LockMode implements FindOption, RefreshOption {
* as {@link #PESSIMISTIC_WRITE}. But if the lock is not
* immediately available, no exception occurs, but the locked
* row is not returned from the database.
*
* @deprecated Use {@linkplain Locking.LockedRows#SKIP} instead.
*/
@Deprecated
UPGRADE_SKIPLOCKED,

/**
Expand All @@ -143,6 +148,10 @@ public enum LockMode implements FindOption, RefreshOption {
* lock mode is equivalent to {@link #PESSIMISTIC_WRITE}.
*
* @see LockModeType#PESSIMISTIC_READ
* @see jakarta.persistence.Timeout
* @see Locking.Scope
* @see Locking.FollowOn
* @see Locking.LockedRows
*/
PESSIMISTIC_READ,

Expand All @@ -152,6 +161,10 @@ public enum LockMode implements FindOption, RefreshOption {
* Obtained via a {@code select for update} statement.
*
* @see LockModeType#PESSIMISTIC_WRITE
* @see jakarta.persistence.Timeout
* @see Locking.Scope
* @see Locking.FollowOn
* @see Locking.LockedRows
*/
PESSIMISTIC_WRITE,

Expand All @@ -163,6 +176,10 @@ public enum LockMode implements FindOption, RefreshOption {
* Only legal for versioned entity types.
*
* @see LockModeType#PESSIMISTIC_FORCE_INCREMENT
* @see jakarta.persistence.Timeout
* @see Locking.Scope
* @see Locking.FollowOn
* @see Locking.LockedRows
*/
PESSIMISTIC_FORCE_INCREMENT;

Expand Down
Loading
Loading