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/MemoryImpl.java
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.management;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.lang.management.MemoryNotificationInfo;
import java.lang.management.MemoryManagerMXBean;
import java.lang.management.MemoryPoolMXBean;
import javax.management.ObjectName;
import javax.management.MBeanNotificationInfo;
import javax.management.Notification;
import javax.management.openmbean.CompositeData;
/**
* Implementation class for the memory subsystem.
* Standard and committed hotspot-specific metrics if any.
*
* ManagementFactory.getMemoryMXBean() returns an instance
* of this class.
*/
class MemoryImpl extends NotificationEmitterSupport
implements MemoryMXBean {
private final VMManagement jvm;
private static MemoryPoolMXBean[] pools = null;
private static MemoryManagerMXBean[] mgrs = null;
/**
* Constructor of MemoryImpl class
*/
MemoryImpl(VMManagement vm) {
this.jvm = vm;
}
public int getObjectPendingFinalizationCount() {
return jdk.internal.misc.VM.getFinalRefCount();
}
public void gc() {
Runtime.getRuntime().gc();
}
// Need to make a VM call to get coherent value
public MemoryUsage getHeapMemoryUsage() {
return getMemoryUsage0(true);
}
public MemoryUsage getNonHeapMemoryUsage() {
return getMemoryUsage0(false);
}
public boolean isVerbose() {
return jvm.getVerboseGC();
}
public void setVerbose(boolean value) {
Util.checkControlAccess();
setVerboseGC(value);
}
// The current Hotspot implementation does not support
// dynamically add or remove memory pools & managers.
static synchronized MemoryPoolMXBean[] getMemoryPools() {
if (pools == null) {
pools = getMemoryPools0();
}
return pools;
}
static synchronized MemoryManagerMXBean[] getMemoryManagers() {
if (mgrs == null) {
mgrs = getMemoryManagers0();
}
return mgrs;
}
private static native MemoryPoolMXBean[] getMemoryPools0();
private static native MemoryManagerMXBean[] getMemoryManagers0();
private native MemoryUsage getMemoryUsage0(boolean heap);
private native void setVerboseGC(boolean value);
private static final String notifName =
"javax.management.Notification";
private static final String[] notifTypes = {
MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED,
MemoryNotificationInfo.MEMORY_COLLECTION_THRESHOLD_EXCEEDED
};
private static final String[] notifMsgs = {
"Memory usage exceeds usage threshold",
"Memory usage exceeds collection usage threshold"
};
public MBeanNotificationInfo[] getNotificationInfo() {
return new MBeanNotificationInfo[] {
new MBeanNotificationInfo(notifTypes, notifName, "Memory Notification")
};
}
private static String getNotifMsg(String notifType) {
for (int i = 0; i < notifTypes.length; i++) {
if (notifType == notifTypes[i]) {
return notifMsgs[i];
}
}
return "Unknown message";
}
private static long seqNumber = 0;
private static long getNextSeqNumber() {
return ++seqNumber;
}
static void createNotification(String notifType,
String poolName,
MemoryUsage usage,
long count) {
MemoryImpl mbean = (MemoryImpl) ManagementFactory.getMemoryMXBean();
if (!mbean.hasListeners()) {
// if no listener is registered.
return;
}
long timestamp = System.currentTimeMillis();
String msg = getNotifMsg(notifType);
Notification notif = new Notification(notifType,
mbean.getObjectName(),
getNextSeqNumber(),
timestamp,
msg);
MemoryNotificationInfo info =
new MemoryNotificationInfo(poolName,
usage,
count);
CompositeData cd =
MemoryNotifInfoCompositeData.toCompositeData(info);
notif.setUserData(cd);
mbean.sendNotification(notif);
}
public ObjectName getObjectName() {
return Util.newObjectName(ManagementFactory.MEMORY_MXBEAN_NAME);
}
}
⏎ sun/management/MemoryImpl.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, ≈110🔥, 0💬
Popular Posts:
What Is javax.websocket-api-1.1. jar?javax.websocket-api-1.1. jaris the JAR file for Java API for We...
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Jav...
What JAR files are required to run dom\Writer.java provided in the Apache Xerces package? 3 JAR file...
How to perform XML Schema validation with sax\Writer.java provided in the Apache Xerces package? You...
JDK 17 jdk.internal.JVM Stat.jmod is the JMOD file for JDK 17 Internal Jvmstat module. JDK 17 Intern...