Class LockTimeoutException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DeadlockException

public class LockTimeoutException extends LockFailureException
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 Details

    • LockTimeoutException

      public LockTimeoutException(long nanosTimeout)
      Parameters:
      nanosTimeout - negative is interpreted as infinite wait
    • LockTimeoutException

      public LockTimeoutException(long nanosTimeout, Object attachment)
      Parameters:
      nanosTimeout - negative is interpreted as infinite wait
  • Method Details

    • timeoutNanos

      public long timeoutNanos()
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • timeout

      public long timeout()
    • ownerAttachment

      public Object 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

      public TimeUnit unit()