Package jakarta.persistence
Class Timeout
java.lang.Object
jakarta.persistence.Timeout
- All Implemented Interfaces:
FindOption
,LockOption
,RefreshOption
Specifies a timeout for a database request. This option is
always a hint, and may be ignored by the provider.
- Since:
- 3.2
-
Method Summary
Modifier and TypeMethodDescriptionint
The timeout in milliseconds.static Timeout
milliseconds
(int milliseconds) Specify a timeout in milliseconds.static Timeout
ms
(int milliseconds) Specify a timeout in milliseconds.static Timeout
s
(int seconds) Specify a timeout in seconds.static Timeout
seconds
(int seconds) Specify a timeout in seconds.
-
Method Details
-
s
Specify a timeout in seconds. (Abbreviation ofseconds(int)
.) -
ms
Specify a timeout in milliseconds. (Abbreviation ofmilliseconds(int)
.) -
seconds
Specify a timeout in seconds. -
milliseconds
Specify a timeout in milliseconds. -
milliseconds
public int milliseconds()The timeout in milliseconds.
-