Package org.hibernate.dialect.lock.spi
Interface ConnectionLockTimeoutStrategy
Contract for reading and setting lock timeouts using the
JDBC connection, generally via execution
of a command/statement.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Indicates a Dialect's level of support for lock timeouts on the JDBC connection. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault Timeout
getLockTimeout
(Connection connection, SessionFactoryImplementor factory) Read the lock timeout associated with the JDBC connection, if supported and there is one.What type, if any, of support this Dialect has for lock timeouts on the JDBC connection.default void
setLockTimeout
(Timeout timeout, Connection connection, SessionFactoryImplementor factory) Set the lock timeout associated with the JDBC connection (if supported), in milliseconds.
-
Field Details
-
NONE
-
-
Method Details
-
getSupportedLevel
ConnectionLockTimeoutStrategy.Level getSupportedLevel()What type, if any, of support this Dialect has for lock timeouts on the JDBC connection.- See Also:
-
getLockTimeout
Read the lock timeout associated with the JDBC connection, if supported and there is one.- Throws:
UnsupportedOperationException
- when getSupportedLevel() is ConnectionLockTimeoutStrategy.Level.NONE- See Also:
-
setLockTimeout
default void setLockTimeout(Timeout timeout, Connection connection, SessionFactoryImplementor factory) Set the lock timeout associated with the JDBC connection (if supported), in milliseconds.- Throws:
UnsupportedOperationException
- when getSupportedLevel() is ConnectionLockTimeoutStrategy.Level.NONE- See Also:
-