Class StandardLockingSupports
Creates standard pessimistic-locking profiles for a custom Dialect.
Prefer a named database-family factory when extending a maintained Dialect.
The named factories preserve Hibernate's version boundaries and coordinated
metadata, renderers, timeout handling, and follow-on policy. Use simple(PessimisticLockStyle, RowLockStrategy, LockTimeoutType, OuterJoinLockingType, ConnectionLockTimeoutStrategy)
or parameterized(PessimisticLockStyle, RowLockStrategy, LockTimeoutType, LockTimeoutType, LockTimeoutType, OuterJoinLockingType, TransactionConcurrencyResolver) only when defining a distinct provider profile.
Returned profiles are immutable or thread-safe and may be retained for the lifetime of the Dialect. Their concrete implementation is intentionally not part of the provider contract.
- Since:
- 8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic LockingSupportcockroach(DatabaseVersion version) The CockroachDB profile selected for the given database version.static LockingSupportdb2(DatabaseVersion version) The DB2 LUW profile, including skip-locked support beginning with 11.5.static LockingSupportdb2i()The DB2 for i profile.static LockingSupportdb2z()The DB2 for z/OS profile.static LockingSupporth2(DatabaseVersion version) The H2 profile selected for the given database version.static LockingSupporthana(DatabaseVersion version) The HANA profile selected for the given database version.static LockingSupporthsql(DatabaseVersion version) The HSQLDB profile selected for the given database version.static LockingSupportThe historical DB2 for i profile inherited from DB2 LUW.static LockingSupportThe historical Sybase ASE profile.static LockingSupportmariaDb(DatabaseVersion version) The MariaDB profile selected for the given database version.static LockingSupportmysql(DatabaseVersion version) The MySQL profile selected for the given database version.static LockingSupportnone()A profile for a database which does not support pessimistic locking.static LockingSupportoracle(DatabaseVersion version) The Oracle profile selected for the given database version.static LockingSupportparameterized(PessimisticLockStyle pessimisticLockStyle, RowLockStrategy rowLockStrategy, LockTimeoutType waitType, LockTimeoutType noWaitType, LockTimeoutType skipLockedType, OuterJoinLockingType outerJoinLockingType) Creates a statement-clause profile with independent timeout classifications.static LockingSupportparameterized(PessimisticLockStyle pessimisticLockStyle, RowLockStrategy rowLockStrategy, LockTimeoutType waitType, LockTimeoutType noWaitType, LockTimeoutType skipLockedType, OuterJoinLockingType outerJoinLockingType, boolean readsWaitForUncommittedWrites) Deprecated, for removal: This API element is subject to removal in a future version.static LockingSupportparameterized(PessimisticLockStyle style, RowLockStrategy rowLockStrategy, LockTimeoutType waitType, LockTimeoutType noWaitType, LockTimeoutType skipLockedType, OuterJoinLockingType outerJoinType, TransactionConcurrencyResolver resolver) Creates a parameterized SQL strategy with an explicit concurrency resolver.static LockingSupportpostgresql(DatabaseVersion version) The PostgreSQL profile selected for the given database version.static LockingSupportsimple(PessimisticLockStyle pessimisticLockStyle, RowLockStrategy rowLockStrategy, LockTimeoutType lockTimeoutType, OuterJoinLockingType outerJoinLockingType, ConnectionLockTimeoutStrategy connectionLockTimeoutStrategy) Creates a profile using one timeout classification for every timeout value.static LockingSupportsimple(PessimisticLockStyle pessimisticLockStyle, RowLockStrategy rowLockStrategy, LockTimeoutType lockTimeoutType, OuterJoinLockingType outerJoinLockingType, ConnectionLockTimeoutStrategy connectionLockTimeoutStrategy, boolean readsWaitForUncommittedWrites) Deprecated, for removal: This API element is subject to removal in a future version.Use the overload acceptingTransactionConcurrencyResolver.static LockingSupportsimple(PessimisticLockStyle style, RowLockStrategy rowLockStrategy, LockTimeoutType timeoutType, OuterJoinLockingType outerJoinType, ConnectionLockTimeoutStrategy timeoutStrategy, TransactionConcurrencyResolver resolver) Creates a simple SQL strategy with an explicit concurrency resolver.static LockingSupportsqlServer(DatabaseVersion version) The SQL Server profile selected for the given database version.static LockingSupportstandard()The standard statement-clause profile inherited byDialect.static LockingSupportThe standard statement-clause profile without outer-join locking.static LockingSupportsybase()The Sybase profile.static LockingSupportsybaseAnywhere(DatabaseVersion version) The Sybase Anywhere profile selected for the given database version.static LockingSupportThe Sybase ASE profile.static LockingSupporttimesTen()The TimesTen profile.
-
Method Details
-
none
A profile for a database which does not support pessimistic locking. -
standard
The standard statement-clause profile inherited byDialect. -
standardWithoutOuterJoinLocking
The standard statement-clause profile without outer-join locking. -
simple
public static LockingSupport simple(PessimisticLockStyle pessimisticLockStyle, RowLockStrategy rowLockStrategy, LockTimeoutType lockTimeoutType, OuterJoinLockingType outerJoinLockingType, ConnectionLockTimeoutStrategy connectionLockTimeoutStrategy) Creates a profile using one timeout classification for every timeout value. -
simple
@Deprecated(since="8.0", forRemoval=true) public static LockingSupport simple(PessimisticLockStyle pessimisticLockStyle, RowLockStrategy rowLockStrategy, LockTimeoutType lockTimeoutType, OuterJoinLockingType outerJoinLockingType, ConnectionLockTimeoutStrategy connectionLockTimeoutStrategy, boolean readsWaitForUncommittedWrites) Deprecated, for removal: This API element is subject to removal in a future version.Use the overload acceptingTransactionConcurrencyResolver.Legacy profile factory retaining the old read-blocking metadata. The boolean is not used for concurrency resolution or current-read rendering. -
simple
public static LockingSupport simple(PessimisticLockStyle style, RowLockStrategy rowLockStrategy, LockTimeoutType timeoutType, OuterJoinLockingType outerJoinType, ConnectionLockTimeoutStrategy timeoutStrategy, TransactionConcurrencyResolver resolver) Creates a simple SQL strategy with an explicit concurrency resolver.- Since:
- 8.0
-
parameterized
public static LockingSupport parameterized(PessimisticLockStyle style, RowLockStrategy rowLockStrategy, LockTimeoutType waitType, LockTimeoutType noWaitType, LockTimeoutType skipLockedType, OuterJoinLockingType outerJoinType, TransactionConcurrencyResolver resolver) Creates a parameterized SQL strategy with an explicit concurrency resolver.- Since:
- 8.0
-
parameterized
public static LockingSupport parameterized(PessimisticLockStyle pessimisticLockStyle, RowLockStrategy rowLockStrategy, LockTimeoutType waitType, LockTimeoutType noWaitType, LockTimeoutType skipLockedType, OuterJoinLockingType outerJoinLockingType) Creates a statement-clause profile with independent timeout classifications. -
parameterized
@Deprecated(since="8.0", forRemoval=true) public static LockingSupport parameterized(PessimisticLockStyle pessimisticLockStyle, RowLockStrategy rowLockStrategy, LockTimeoutType waitType, LockTimeoutType noWaitType, LockTimeoutType skipLockedType, OuterJoinLockingType outerJoinLockingType, boolean readsWaitForUncommittedWrites) Deprecated, for removal: This API element is subject to removal in a future version.Use the overload acceptingTransactionConcurrencyResolver.Legacy profile factory retaining the old read-blocking metadata. The boolean is not used for concurrency resolution or current-read rendering. -
db2
The DB2 LUW profile, including skip-locked support beginning with 11.5. -
db2i
The DB2 for i profile. -
legacyDb2i
The historical DB2 for i profile inherited from DB2 LUW. -
db2z
The DB2 for z/OS profile. -
h2
The H2 profile selected for the given database version. -
hana
The HANA profile selected for the given database version. -
hsql
The HSQLDB profile selected for the given database version. -
mysql
The MySQL profile selected for the given database version. -
mariaDb
The MariaDB profile selected for the given database version. -
oracle
The Oracle profile selected for the given database version. -
postgresql
The PostgreSQL profile selected for the given database version. -
cockroach
The CockroachDB profile selected for the given database version. -
timesTen
The TimesTen profile. -
sqlServer
The SQL Server profile selected for the given database version. -
sybase
The Sybase profile. -
sybaseAse
The Sybase ASE profile. -
legacySybaseAse
The historical Sybase ASE profile. -
sybaseAnywhere
The Sybase Anywhere profile selected for the given database version.
-
TransactionConcurrencyResolver.