Interface ConnectionLockTimeoutStrategy
@Incubating(since="7.1",
group="dialect-locking")
@SPI({USE,IMPLEMENT,SUPPLY})
public interface ConnectionLockTimeoutStrategy
Reads and sets lock timeouts using the JDBC Connection, generally by
executing a database command.
Implementations supplied by a LockingSupport must be thread-safe and must
not retain a connection, factory, or timeout request. Use
ConnectionLockTimeoutOperations for the standard Hibernate-integrated JDBC
execution lifecycle.
- Since:
- 8.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumIndicates a Dialect's level of support for lock timeouts on the JDBC connection. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault TimeoutgetLockTimeout(Connection connection, SessionFactoryImplementor factory) Reads the lock timeout associated with the JDBC connection.Reports which connection-level lock-timeout operations this strategy supports.default voidsetLockTimeout(Timeout timeout, Connection connection, SessionFactoryImplementor factory) Sets the lock timeout associated with the JDBC connection.
-
Field Details
-
NONE
-
-
Method Details
-
getSupportedLevel
ConnectionLockTimeoutStrategy.Level getSupportedLevel()Reports which connection-level lock-timeout operations this strategy supports.- See Also:
-
getLockTimeout
Reads the lock timeout associated with the JDBC connection.- Throws:
UnsupportedOperationException- whengetSupportedLevel()isConnectionLockTimeoutStrategy.Level.NONE- See Also:
-
setLockTimeout
default void setLockTimeout(Timeout timeout, Connection connection, SessionFactoryImplementor factory) Sets the lock timeout associated with the JDBC connection.- Throws:
UnsupportedOperationException- whengetSupportedLevel()isConnectionLockTimeoutStrategy.Level.NONE- See Also:
-