Class ThreadLockStats

java.lang.Object
com.yahoo.vespa.curator.stats.ThreadLockStats

public class ThreadLockStats extends Object
This class manages thread-specific statistics and information related to acquiring and releasing Lock. Instances of this class contain information tied to a specific thread and lock path.

Instances of this class are thread-safe as long as foreign threads (!= this.thread) avoid mutable methods.

Author:
hakon
  • Method Details

    • getThreadName

      public String getThreadName()
    • getStackTrace

      public String getStackTrace()
    • getOngoingLockAttempts

      public List<LockAttempt> getOngoingLockAttempts()
    • getTopMostOngoingLockAttempt

      public Optional<LockAttempt> getTopMostOngoingLockAttempt()
    • getBottomMostOngoingLockAttempt

      public Optional<LockAttempt> getBottomMostOngoingLockAttempt()
      The most recent and deeply nested ongoing lock attempt.
    • getOngoingRecording

      public Optional<RecordedLockAttempts> getOngoingRecording()
    • invokingAcquire

      public void invokingAcquire(String lockPath, Duration timeout)
      Mutable method (see class doc)
    • acquireFailed

      public void acquireFailed()
      Mutable method (see class doc)
    • acquireTimedOut

      public void acquireTimedOut()
      Mutable method (see class doc)
    • lockAcquired

      public void lockAcquired()
      Mutable method (see class doc)
    • preRelease

      public void preRelease(String path)
      Mutable method (see class doc)
    • postRelease

      public void postRelease(String lockPath)
      Mutable method (see class doc)
    • releaseFailed

      public void releaseFailed(String lockPath)
      Mutable method (see class doc)
    • startRecording

      public void startRecording(String recordId)
      Mutable method (see class doc)
    • stopRecording

      public void stopRecording()
      Mutable method (see class doc)