| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private Boolean | |
| 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
Represents LockMode.NONE (timeout + scope do not apply). |
| public static final LockOptions | READ
Represents LockMode.READ (timeout + scope do not apply). |
| private boolean | |
| public static final int | SKIP_LOCKED
Indicates that rows that are already locked should be skipped. |
| private int | |
| public static final LockOptions | 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 | LockOptions(LockMode
The lock mode to use lockMode)Constructs a LockOptions with the given lock mode. |
| Modifier and Type | Method and Description |
|---|---|
| public static LockOptions | Returns: destinationSource for the copy (copied from) source, LockOptions Destination for the copy (copied to) destination)Perform a shallow copy. |
| public LockMode | Returns: The greatest of all requested lock modes.Currently needed for follow-on locking. |
| 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 Iterable | Returns: Iterable for accessing the Map.Entry'sIterable access to alias (key) and LockMode (value) as Map.Entry. |
| public LockMode | Returns: The effective lock mode.The alias for which to locate the effective lock mode. alias)Determine the |
| public Boolean | Returns: true if follow-on-locking is enabledRetrieve the current follow-on-locking setting. |
| 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 boolean | Returns: true if this LockOptions object define alias-specific lock modes; false otherwise.Does this LockOptions object define alias-specific lock modes? |
| public static LockOptions | |
| public LockOptions | |
| 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 follow-on-locking setting followOnLocking)Set the the follow-on-locking setting. |
| 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, in milliseconds timeout)Set the timeout setting. |
| aliasSpecificLockModes | back to summary |
|---|---|
| private Map<String, LockMode> aliasSpecificLockModes | |
| followOnLocking | back to summary |
|---|---|
| private Boolean followOnLocking | |
| 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 Represents LockMode.NONE (timeout + scope do not apply). | |
| READ | back to summary |
|---|---|
| public static final LockOptions READ Represents LockMode.READ (timeout + scope do not apply). | |
| scope | back to summary |
|---|---|
| private boolean scope | |
| SKIP_LOCKED | back to summary |
|---|---|
| public static final int SKIP_LOCKED Indicates that rows that are already locked should be skipped.
| |
| timeout | back to summary |
|---|---|
| private int timeout | |
| UPGRADE | back to summary |
|---|---|
| public static final LockOptions 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() Constructs a LockOptions with all default options. | |
| LockOptions | back to summary |
|---|---|
| public LockOptions(LockMode lockMode) Constructs a LockOptions with the given lock mode.
| |
| copy | back to summary |
|---|---|
| public static LockOptions copy(LockOptions source, LockOptions destination) Perform a shallow copy.
| |
| findGreatestLockMode | back to summary |
|---|---|
| public LockMode findGreatestLockMode() Currently needed for follow-on locking.
| |
| 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 | |
| getAliasSpecificLocks | back to summary |
|---|---|
| public Iterable Iterable access to alias (key) and LockMode (value) as Map.Entry. | |
| getEffectiveLockMode | back to summary |
|---|---|
| public LockMode getEffectiveLockMode(String alias) Determine the
Differs from | |
| getFollowOnLocking | back to summary |
|---|---|
| public Boolean getFollowOnLocking() Retrieve the current follow-on-locking setting.
| |
| 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.
| |
| hasAliasSpecificLockModes | back to summary |
|---|---|
| public boolean hasAliasSpecificLockModes() Does this LockOptions object define alias-specific lock modes?
| |
| interpret | back to summary |
|---|---|
| public static LockOptions interpret(LockMode lockMode) | |
| makeCopy | back to summary |
|---|---|
| public LockOptions makeCopy() Make a copy.
| |
| setAliasSpecificLockMode | back to summary |
|---|---|
| public LockOptions setAliasSpecificLockMode(String alias, LockMode lockMode) Specify the
| |
| setFollowOnLocking | back to summary |
|---|---|
| public LockOptions setFollowOnLocking(Boolean followOnLocking) Set the the follow-on-locking setting.
| |
| setLockMode | back to summary |
|---|---|
| public LockOptions setLockMode(LockMode lockMode) Set the overall
| |
| setScope | back to summary |
|---|---|
| public LockOptions setScope(boolean scope) Set the scope.
| |
| setTimeOut | back to summary |
|---|---|
| public LockOptions setTimeOut(int timeout) Set the timeout setting.
See
| |