Interface MonitorData
- All Superinterfaces:
TimeData
- All Known Implementing Classes:
MonitorDataImpl
This class contains information about a specific thread lock, or monitor.
-
Method Summary
Modifier and TypeMethodDescriptionlongGets the total number of times the lock was acquired while it was inflated.longGets the average amount of time the lock was held for.doubleGets the percentage of total acquires for which the thread had to block before it could take the lock.getName()Gets the name of this monitor.longGets the total number of times the thread requested the lock when it already owned it.longGets the total number of times the thread had to wait to acquire the lock.doubleGets the percentage of monitoring time that the lock was held for.
-
Method Details
-
getContention
double getContention()Gets the percentage of total acquires for which the thread had to block before it could take the lock.- Returns:
- the percentage of acquires that were contended.
-
getAcquireCount
long getAcquireCount()Gets the total number of times the lock was acquired while it was inflated.- Returns:
- the total number of acquires.
-
getSlowCount
long getSlowCount()Gets the total number of times the thread had to wait to acquire the lock.- Returns:
- the total number of slow acquires.
-
getRecursiveCount
long getRecursiveCount()Gets the total number of times the thread requested the lock when it already owned it.- Returns:
- the total number of recursive acquires.
-
getUtilisation
double getUtilisation()Gets the percentage of monitoring time that the lock was held for.- Returns:
- the utilisation, as a percentage.
-
getAverageHoldTime
long getAverageHoldTime()Gets the average amount of time the lock was held for. This value is given in processor clock ticks.- Returns:
- the average hold time, in clock ticks.
-
getName
String getName()Gets the name of this monitor.- Returns:
- a String representation of the monitor name.
-