Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
Collections:
Other Resources:
JDK 17 jdk.internal.jvmstat.jmod - Internal JVM Stat Module
JDK 17 jdk.internal.JVM Stat.jmod is the JMOD file for JDK 17 Internal Jvmstat module.
JDK 17 Internal JVM Stat module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.internal.jvmstat.jmod.
JDK 17 Internal JVM Stat module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Internal JVM Stat module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.internal.jvmstat.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/jvmstat/perfdata/monitor/protocol/local/LocalVmManager.java
/* * Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package sun.jvmstat.perfdata.monitor.protocol.local; import sun.jvmstat.monitor.*; import sun.jvmstat.monitor.event.*; import java.util.*; import java.util.regex.*; import java.io.*; /** * Class for managing the LocalMonitoredVm instances on the local system. * <p> * This class is responsible for the mechanism that detects the active * HotSpot Java Virtual Machines on the local host and possibly for a * specific user. The ability to detect all possible HotSpot Java Virtual * Machines on the local host may be limited by the permissions of the * principal running this JVM. * * @author Brian Doherty * @since 1.5 */ public class LocalVmManager { private String userName; // user name for monitored jvm private Pattern userPattern; private Matcher userMatcher; private FilenameFilter userFilter; private Pattern filePattern; private Matcher fileMatcher; private FilenameFilter fileFilter; private Pattern tmpFilePattern; private Matcher tmpFileMatcher; private FilenameFilter tmpFileFilter; /** * Creates a LocalVmManager instance for the local system. * <p> * Manages LocalMonitoredVm instances for which the principal * has appropriate permissions. */ public LocalVmManager() { this(null); } /** * Creates a LocalVmManager instance for the given user. * <p> * Manages LocalMonitoredVm instances for all JVMs owned by the specified * user. * * @param user the name of the user */ public LocalVmManager(String user) { this.userName = user; if (userName == null) { userPattern = Pattern.compile(PerfDataFile.userDirNamePattern); userMatcher = userPattern.matcher(""); userFilter = new FilenameFilter() { public boolean accept(File dir, String name) { userMatcher.reset(name); return userMatcher.lookingAt(); } }; } filePattern = Pattern.compile(PerfDataFile.fileNamePattern); fileMatcher = filePattern.matcher(""); fileFilter = new FilenameFilter() { public boolean accept(File dir, String name) { fileMatcher.reset(name); return fileMatcher.matches(); } }; tmpFilePattern = Pattern.compile(PerfDataFile.tmpFileNamePattern); tmpFileMatcher = tmpFilePattern.matcher(""); tmpFileFilter = new FilenameFilter() { public boolean accept(File dir, String name) { tmpFileMatcher.reset(name); return tmpFileMatcher.matches(); } }; } /** * Return the current set of monitorable Java Virtual Machines. * <p> * The set returned by this method depends on the user name passed * to the constructor. If no user name was specified, then this * method will return all candidate JVMs on the system. Otherwise, * only the JVMs for the given user will be returned. This assumes * that principal associated with this JVM has the appropriate * permissions to access the target set of JVMs. * * @return Set - the Set of monitorable Java Virtual Machines */ public synchronized Set<Integer> activeVms() { /* * This method is synchronized because the Matcher object used by * fileFilter is not safe for concurrent use, and this method is * called by multiple threads. Before this method was synchronized, * we'd see strange file names being matched by the matcher. */ Set<Integer> jvmSet = new HashSet<Integer>(); List<String> tmpdirs = PerfDataFile.getTempDirectories(userName, 0); for (String dir : tmpdirs) { File tmpdir = new File(dir); if (! tmpdir.isDirectory()) { continue; } if (userName == null) { /* * get a list of all of the user temporary directories and * iterate over the list to find any files within those directories. */ File[] dirs = tmpdir.listFiles(userFilter); for (int i = 0 ; i < dirs.length; i ++) { if (!dirs[i].isDirectory()) { continue; } // get a list of files from the directory File[] files = dirs[i].listFiles(fileFilter); if (files != null) { for (int j = 0; j < files.length; j++) { if (files[j].isFile() && files[j].canRead()) { int vmid = PerfDataFile.getLocalVmId(files[j]); if (vmid != -1) { jvmSet.add(vmid); } } } } } } else { /* * Check if the user directory can be accessed. Any of these * conditions may have asynchronously changed between subsequent * calls to this method. */ // get the list of files from the specified user directory File[] files = tmpdir.listFiles(fileFilter); if (files != null) { for (int j = 0; j < files.length; j++) { if (files[j].isFile() && files[j].canRead()) { int vmid = PerfDataFile.getLocalVmId(files[j]); if (vmid != -1) { jvmSet.add(vmid); } } } } } // look for any 1.4.1 files File[] files = tmpdir.listFiles(tmpFileFilter); if (files != null) { for (int j = 0; j < files.length; j++) { if (files[j].isFile() && files[j].canRead()) { int vmid = PerfDataFile.getLocalVmId(files[j]); if (vmid != -1) { jvmSet.add(vmid); } } } } } return jvmSet; } }
⏎ sun/jvmstat/perfdata/monitor/protocol/local/LocalVmManager.java
Or download all of them as a single archive file:
File name: jdk.internal.jvmstat-17.0.5-src.zip File size: 89372 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.internal.le.jmod - Internal Line Editing Module
2023-08-25, 3663👍, 0💬
Popular Posts:
The Java Naming and Directory Interface (JNDI) is part of the Java platform, providing applications ...
Xalan-Java, Version 2.7.1, is an XSLT processor for transforming XML documents into HTML, text, or o...
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Jav...
JDK 11 java.management.jmod is the JMOD file for JDK 11 Management module. JDK 11 Management module ...
JDOM provides a solution for using XML from Java that is as simple as Java itself. There is no compe...