Class LockAttempt


  • public class LockAttempt
    extends Object
    Information about a lock.

    Should be mutated by a single thread, except fillStackTrace() which can be invoked by any threads. Other threads may see an inconsistent state of this instance.

    Author:
    hakon
    • Method Detail

      • getThreadName

        public String getThreadName()
      • getLockPath

        public String getLockPath()
      • getTimeAcquiredWasInvoked

        public Instant getTimeAcquiredWasInvoked()
      • getAcquireTimeout

        public Duration getAcquireTimeout()
      • getReentry

        public boolean getReentry()
      • getTimeLockWasAcquired

        public Optional<Instant> getTimeLockWasAcquired()
      • isAcquiring

        public boolean isAcquiring()
      • getTimeAcquireEndedOrNow

        public Instant getTimeAcquireEndedOrNow()
      • getTimeTerminalStateWasReached

        public Optional<Instant> getTimeTerminalStateWasReached()
      • getDurationOfAcquire

        public Duration getDurationOfAcquire()
      • getDurationWithLock

        public Duration getDurationWithLock()
      • getDuration

        public Duration getDuration()
      • getStableTotalDuration

        public Duration getStableTotalDuration()
        Get time from just before trying to acquire lock to the time the terminal state was reached, or ZERO.
      • fillStackTrace

        public void fillStackTrace()
        Fill in the stack trace starting at the caller's stack frame.