| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private LockMode | |
| public static final int | NO_WAIT
Indicates that the database should not wait at all to acquire the pessimistic lock. |
| public static final LockOptions | NONE
NONE represents LockMode.NONE (timeout + scope do not apply) |
| public static final LockOptions | READ
READ represents LockMode.READ (timeout + scope do not apply) |
| private boolean | |
| private int | |
| public static final LockOptions | UPGRADE
UPGRADE represents LockMode.UPGRADE (will wait forever for lock and scope of false meaning only entity is locked) |
| public static final int | WAIT_FOREVER
Indicates that there is no timeout for the acquisition. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static LockOptions | Returns: destis copied from from, LockOptions is copied to dest)Shallow copy From to Dest |
| public int | Returns: the number of explicitly defined alias lock modes.Get the number of aliases that have specific lock modes defined. |
| public Iterator | Returns: Iterator for accessing the Map.Entry'sIterator for accessing Alias (key) and LockMode (value) as Map.Entry |
| public LockMode | Returns: The explicit lock mode for that alias.The alias for which to locate the explicit lock mode. alias)Get the
Differs from |
| public LockMode | Returns: The effective lock mode.The alias for which to locate the effective lock mode. alias)Determine the |
| public LockMode | Returns: The overall lock mode.Retrieve the overall lock mode in effect for this set of options. |
| public boolean | Returns: true if locking will be extended to owned associationsRetrieve the current lock scope setting. |
| public int | |
| public LockOptions | Returns: this LockRequest instance for operation chaining.used to reference the LockMode. alias, LockMode The lock mode to apply to the given alias lockMode)Specify the |
| public LockOptions | Returns: this (for method chaining).The new overall lock mode to use. lockMode)Set the overall |
| public LockOptions | |
| public LockOptions | Returns: this (for method chaining).The new timeout setting. timeout)Set the timeout setting. |
| aliasSpecificLockModes | back to summary |
|---|---|
| private Map<K, V> aliasSpecificLockModes | |
| lockMode | back to summary |
|---|---|
| private LockMode lockMode | |
| NO_WAIT | back to summary |
|---|---|
| public static final int NO_WAIT Indicates that the database should not wait at all to acquire the pessimistic lock.
| |
| NONE | back to summary |
|---|---|
| public static final LockOptions NONE NONE represents LockMode.NONE (timeout + scope do not apply) | |
| READ | back to summary |
|---|---|
| public static final LockOptions READ READ represents LockMode.READ (timeout + scope do not apply) | |
| scope | back to summary |
|---|---|
| private boolean scope | |
| timeout | back to summary |
|---|---|
| private int timeout | |
| UPGRADE | back to summary |
|---|---|
| public static final LockOptions UPGRADE UPGRADE represents LockMode.UPGRADE (will wait forever for lock and scope of false meaning only entity is locked) | |
| WAIT_FOREVER | back to summary |
|---|---|
| public static final int WAIT_FOREVER Indicates that there is no timeout for the acquisition.
| |
| LockOptions | back to summary |
|---|---|
| public LockOptions() | |
| LockOptions | back to summary |
|---|---|
| public LockOptions(LockMode lockMode) | |
| copy | back to summary |
|---|---|
| public static LockOptions copy(LockOptions from, LockOptions dest) Shallow copy From to Dest
| |
| getAliasLockCount | back to summary |
|---|---|
| public int getAliasLockCount() Get the number of aliases that have specific lock modes defined.
| |
| getAliasLockIterator | back to summary |
|---|---|
| public Iterator Iterator for accessing Alias (key) and LockMode (value) as Map.Entry
| |
| getAliasSpecificLockMode | back to summary |
|---|---|
| public LockMode getAliasSpecificLockMode(String alias) Get the
Differs from | |
| getEffectiveLockMode | back to summary |
|---|---|
| public LockMode getEffectiveLockMode(String alias) Determine the
Differs from | |
| getLockMode | back to summary |
|---|---|
| public LockMode getLockMode() Retrieve the overall lock mode in effect for this set of options.
In certain contexts (hql and criteria), lock-modes can be defined in an
even more granular
| |
| getScope | back to summary |
|---|---|
| public boolean getScope() Retrieve the current lock scope setting. "scope" is a JPA defined term. It is basically a cascading of the lock to associations.
| |
| getTimeOut | back to summary |
|---|---|
| public int getTimeOut() Retrieve the current timeout setting. The timeout is the amount of time, in milliseconds, we should instruct the database to wait for any requested pessimistic lock acquisition.
| |
| setAliasSpecificLockMode | back to summary |
|---|---|
| public LockOptions setAliasSpecificLockMode(String alias, LockMode lockMode) Specify the
| |
| setLockMode | back to summary |
|---|---|
| public LockOptions setLockMode(LockMode lockMode) Set the overall
| |
| setScope | back to summary |
|---|---|
| public LockOptions setScope(boolean scope) Set the cope.
| |
| setTimeOut | back to summary |
|---|---|
| public LockOptions setTimeOut(int timeout) Set the timeout setting.
See
| |