Package com.yahoo.vespa.curator.stats
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 releasingLock
. 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acquireFailed()
Mutable method (see class doc)void
acquireTimedOut()
Mutable method (see class doc)Optional<LockAttempt>
getBottomMostOngoingLockAttempt()
The most recent and deeply nested ongoing lock attempt.List<LockAttempt>
getOngoingLockAttempts()
Optional<RecordedLockAttempts>
getOngoingRecording()
String
getStackTrace()
String
getThreadName()
Optional<LockAttempt>
getTopMostOngoingLockAttempt()
void
invokingAcquire(String lockPath, Duration timeout)
Mutable method (see class doc)void
lockAcquired()
Mutable method (see class doc)void
postRelease()
Mutable method (see class doc)void
preRelease()
Mutable method (see class doc)void
releaseFailed()
Mutable method (see class doc)void
startRecording(String recordId)
Mutable method (see class doc)void
stopRecording()
Mutable method (see class doc)
-
-
-
Method Detail
-
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()
Mutable method (see class doc)
-
postRelease
public void postRelease()
Mutable method (see class doc)
-
releaseFailed
public void releaseFailed()
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)
-
-