java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.cojen.tupl.DatabaseException
org.cojen.tupl.LockFailureException
org.cojen.tupl.LockTimeoutException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DeadlockException
Thrown when a lock request by a transaction timed out. A
default timeout is defined, which can be
overridden by a transaction.
- See Also:
-
Constructor Summary
ConstructorDescriptionLockTimeoutException
(long nanosTimeout) LockTimeoutException
(long nanosTimeout, Object attachment) -
Method Summary
Methods inherited from class org.cojen.tupl.LockFailureException
isRecoverable
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
LockTimeoutException
public LockTimeoutException(long nanosTimeout) - Parameters:
nanosTimeout
- negative is interpreted as infinite wait
-
LockTimeoutException
- Parameters:
nanosTimeout
- negative is interpreted as infinite wait
-
-
Method Details
-
timeoutNanos
public long timeoutNanos() -
getMessage
- Overrides:
getMessage
in classThrowable
-
timeout
public long timeout() -
ownerAttachment
Returns the object which was attached to the current lock owner shortly after the timeout occurred. If an exclusive lock request failed because any shared locks were held, only the first discovered attachment is provided. -
unit
-