< prev index next >

src/java.management/share/classes/sun/management/Sensor.java

Print this page

        

*** 32,47 **** /** * An abstract sensor. * * <p> ! * A <tt>AbstractSensor</tt> object consists of two attributes: * <ul> ! * <li><tt>on</tt> is a boolean flag indicating if a sensor is * triggered. This flag will be set or cleared by the * component that owns the sensor.</li> ! * <li><tt>count</tt> is the total number of times that a sensor * has been triggered.</li> * </ul> * * @author Mandy Chung * @since 1.5 --- 32,47 ---- /** * An abstract sensor. * * <p> ! * A {@code AbstractSensor} object consists of two attributes: * <ul> ! * <li>{@code on} is a boolean flag indicating if a sensor is * triggered. This flag will be set or cleared by the * component that owns the sensor.</li> ! * <li>{@code count} is the total number of times that a sensor * has been triggered.</li> * </ul> * * @author Mandy Chung * @since 1.5
*** 52,62 **** private String name; private long count; private boolean on; /** ! * Constructs a <tt>Sensor</tt> object. * * @param name The name of this sensor. */ public Sensor(String name) { this.name = name; --- 52,62 ---- private String name; private long count; private boolean on; /** ! * Constructs a {@code Sensor} object. * * @param name The name of this sensor. */ public Sensor(String name) { this.name = name;
*** 86,97 **** } /** * Tests if this sensor is currently on. * ! * @return <tt>true</tt> if the sensor is currently on; ! * <tt>false</tt> otherwise. * */ public boolean isOn() { synchronized (lock) { return on; --- 86,97 ---- } /** * Tests if this sensor is currently on. * ! * @return {@code true} if the sensor is currently on; ! * {@code false} otherwise. * */ public boolean isOn() { synchronized (lock) { return on;
*** 110,120 **** triggerAction(); } /** * Triggers this sensor. This method sets this sensor on ! * and increments the count with the input <tt>increment</tt>. */ public void trigger(int increment) { synchronized (lock) { on = true; count += increment; --- 110,120 ---- triggerAction(); } /** * Triggers this sensor. This method sets this sensor on ! * and increments the count with the input {@code increment}. */ public void trigger(int increment) { synchronized (lock) { on = true; count += increment;
*** 124,134 **** } /** * 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) { synchronized (lock) { on = true; count += increment; --- 124,134 ---- } /** * Triggers this sensor piggybacking a memory usage object. * This method sets this sensor on ! * and increments the count with the input {@code increment}. */ public void trigger(int increment, MemoryUsage usage) { synchronized (lock) { on = true; count += increment;
*** 148,158 **** } /** * Clears this sensor ! * and increments the count with the input <tt>increment</tt>. */ public void clear(int increment) { synchronized (lock) { on = false; count += increment; --- 148,158 ---- } /** * Clears this sensor ! * and increments the count with the input {@code increment}. */ public void clear(int increment) { synchronized (lock) { on = false; count += increment;
< prev index next >