Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 java.management.jmod - Management Module
JDK 17 java.management.jmod is the JMOD file for JDK 17 Management module.
JDK 17 Management module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.management.jmod.
JDK 17 Management module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Management module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.management.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/management/Sensor.java
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.management;
import java.lang.management.MemoryUsage;
import java.util.Iterator;
import java.util.Map;
import java.util.HashMap;
/**
* An abstract sensor.
*
* <p>
* An {@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
*/
public abstract class Sensor {
private final Object lock = new Object();
private final String name;
private long count; // VM-initialized to 0
private boolean on; // VM-initialized to false
/**
* Constructs a {@code Sensor} object.
*
* @param name The name of this sensor.
*/
public Sensor(String name) {
this.name = name;
}
/**
* Returns the name of this sensor.
*
* @return the name of this sensor.
*/
public String getName() {
return name;
}
/**
* Returns the total number of times that this sensor has been triggered.
*
* @return the total number of times that this sensor has been triggered.
*/
public long getCount() {
synchronized (lock) {
return count;
}
}
/**
* 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;
}
}
/**
* Triggers this sensor. This method first sets this sensor on
* and increments its sensor count.
*/
public void trigger() {
synchronized (lock) {
on = true;
count++;
}
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;
// Do something here...
}
triggerAction();
}
/**
* 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;
// Do something here...
}
triggerAction(usage);
}
/**
* Clears this sensor.
*/
public void clear() {
synchronized (lock) {
on = false;
}
clearAction();
}
/**
* Clears this sensor
* and increments the count with the input {@code increment}.
*/
public void clear(int increment) {
synchronized (lock) {
on = false;
count += increment;
}
clearAction();
}
public String toString() {
return "Sensor - " + getName() +
(isOn() ? " on " : " off ") +
" count = " + getCount();
}
abstract void triggerAction();
abstract void triggerAction(MemoryUsage u);
abstract void clearAction();
}
⏎ sun/management/Sensor.java
Or download all of them as a single archive file:
File name: java.management-17.0.5-src.zip File size: 850134 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.management.rmi.jmod - Management RMI Module
2023-09-23, ≈105🔥, 0💬
Popular Posts:
Where Can I get source code files of jsse.jar? You can get source code files of jsse.jar (JSSE) from...
What Is commons-logging-1.2.jar? commons-logging-1.2.jar is the JAR file for Apache Commons Logging ...
jTDS JDBC Driver Source Code Files are provided in the source package file, jtds-1.3.1-fyi.zip. You ...
What Is poi-5.2.3.jar? poi-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an...
Old version of xml-apis.jar. JAR File Size and Download Location: File name: xmlParserAPIs.jar File ...