jdk/src/share/classes/sun/management/Sensor.java
/**
* Triggers this sensor piggybacking a memory usage object.
* This method sets this sensor on
* and increments the count with the input <tt>increment</tt>.
*/
public void trigger(int increment, MemoryUsage usage) {
{- -------------------------------------------
(1) Sensor オブジェクトの状態を on にし, 引数での指定分だけカウンタをインクリメントした後.
triggerAction() メソッドを呼び出してリスナーへの通知処理を行う.
---------------------------------------- -}
synchronized (lock) {
on = true;
count += increment;
// Do something here...
}
triggerAction(usage);
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.