jdk/src/share/classes/sun/management/ThreadImpl.java
public void setThreadContentionMonitoringEnabled(boolean enable) {
{- -------------------------------------------
(1)
---------------------------------------- -}
if (!isThreadContentionMonitoringSupported()) {
throw new UnsupportedOperationException(
"Thread contention monitoring is not supported");
}
Util.checkControlAccess();
synchronized (this) {
if (contentionMonitoringEnabled != enable) {
if (enable) {
// if reeabled, reset contention time statistics
// for all threads
resetContentionTimes0(0);
}
// update the VM of the state change
setThreadContentionMonitoringEnabled0(enable);
contentionMonitoringEnabled = enable;
}
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.