JDK 17 jdk.management.jfr.jmod - Management JFR Module

JDK 17 jdk.management.jfr.jmod is the JMOD file for JDK 17 Management Jfr module.

JDK 17 Management JFR module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.management.jfr.jmod.

JDK 17 Management JFR module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.

JDK 17 Management JFR module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.management.jfr.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

jdk/management/jfr/SettingDescriptorInfo.java

/*
 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package jdk.management.jfr;

import java.util.concurrent.Callable;

import javax.management.openmbean.CompositeData;

import jdk.jfr.EventType;
import jdk.jfr.SettingDescriptor;
import jdk.management.jfr.internal.FlightRecorderMXBeanProvider;

/**
 * Management class that describes a setting, for example name, description and
 * default value.
 *
 * @see EventType#getSettingDescriptors()
 *
 * @since 9
 */
public final class SettingDescriptorInfo {

    // Purpose of this static initializer is to allow
    // FlightRecorderMXBeanProvider
    // to be in an internal package and not visible, but at the same time allow
    // it to instantiate FlightRecorderMXBeanImpl.
    //
    // The reason the mechanism is in this class is because it is light weight
    // and can easily be triggered from FlightRecorderMXBeanProvider.
    static {
        FlightRecorderMXBeanProvider.setFlightRecorderMXBeanFactory(new Callable<FlightRecorderMXBean>() {
            @Override
            public FlightRecorderMXBean call() throws Exception {
                return new FlightRecorderMXBeanImpl();
            }
        });
    }

    private final String name;
    private final String label;
    private final String description;
    private final String typeName;
    private final String contentType;
    private final String defaultValue;

    // package private
    SettingDescriptorInfo(SettingDescriptor settingDescriptor) {
        this.name = settingDescriptor.getName();
        this.label = settingDescriptor.getLabel();
        this.description = settingDescriptor.getDescription();
        this.typeName = settingDescriptor.getTypeName();
        this.contentType = settingDescriptor.getContentType();
        this.defaultValue = settingDescriptor.getDefaultValue();
    }

    private SettingDescriptorInfo(CompositeData cd) {
        this.name = (String) cd.get("name");
        this.label = (String) cd.get("label");
        this.description = (String) cd.get("description");
        this.typeName = (String) cd.get("typeName");
        this.defaultValue = (String) cd.get("defaultValue");
        this.contentType = (String) cd.get("contentType");
    }

    /**
    * Returns the human-readable name of the setting associated with this
     * {@code SettingDescriptorInfo} (for example, {@code "Threshold"}).
     *
     * @return the label for this setting, not {@code null}
     */
    public String getLabel() {
        return label;
    }

    /**
     * Returns the name of the setting associated with this
     * {@code SettingDescriptorInfo} (for example, {@code "threshold"}).
     *
     * @return the name of this setting, not {@code null}
     */
    public String getName() {
        return name;
    }

    /**
     * Returns the description of the setting associated this
     * {@code SettingDescriptorInfo} (for example,
     * {@code "The duration an event must exceed to be be recorded"}).
     *
     * @return the description of this setting, not null
     */
    public String getDescription() {
        return description;
    }

    /**
     * Returns the type name of the setting associated this
     * {@code SettingDescriptorInfo} (for example,
     * {@code "jdk.settings.Threshold"}).
     * <p>
     * The type can be used to identify what type of setting this is.
     *
     * @return the name of this settings type, not {@code null}
     */
    public String getTypeName() {
        return typeName;
    }

    /**
     * Returns the content type of the setting associated this
     * {@code SettingDescriptorInfo} (for example, {@code "jdk.jfr.Timespan"}).
     * <p>
     * The content type can be used to determine how the setting should be
     * rendered in a graphical user interface.
     *
     * @return the name of this settings type, not {@code null}
     */
    public String getContentType() {
        return contentType;
    }

    /**
     * Returns the default value of the setting associated this
     * {@code SettingDescriptorInfo} (for example, {@code "20 ms"}).
     *
     * @return default value for this setting, not {@code null}
     *
     * @see SettingDescriptor#getDefaultValue()
     */
    public String getDefaultValue() {
        return defaultValue;
    }

    /**
     * Returns an {@code SettingDescriptorInfo} represented by the specified
     * {@code CompositeData}
     * <p>
     * The supplied {@code CompositeData} must have the following item names and
     * item types to be valid. <blockquote>
     * <table class="striped">
     * <caption>The name and type the specified CompositeData must contain</caption>
     * <thead>
     * <tr>
     * <th scope="col" style="text-align:left">Name</th>
     * <th scope="col" style="text-align:left">Type</th>
     * </tr>
     * </thead>
     * <tbody>
     * <tr>
     * <th scope="row">name</th>
     * <td>{@code String}</td>
     * </tr>
     * <tr>
     * <th scope="row">label</th>
     * <td>{@code String}</td>
     * </tr>
     * <tr>
     * <th scope="row">description</th>
     * <td>{@code String}</td>
     * </tr>
     * <tr>
     * <th scope="row">typeName</th>
     * <td>{@code String}</td>
     * </tr>
     * <tr>
     * <th scope="row">contentType</th>
     * <td>{@code String}</td>
     * </tr>
     * <tr>
     * <th scope="row">defaultValue</th>
     * <td>{@code String}</td>
     * </tr>
     * </tbody>
     * </table>
     * </blockquote>
     *
     * @param cd {@code CompositeData} representing the {@code SettingDescriptorInfo} to
     *        return
     *
     * @throws IllegalArgumentException if {@code cd} does not represent a valid
     *         {@code EventTypeInfo}
     *
     * @return a {@code SettingDescriptorInfo}, or {@code null} if {@code cd} is
     *         {@code null}
     */
    public static SettingDescriptorInfo from(CompositeData cd) {
        if (cd == null) {
            return null;
        }
        return new SettingDescriptorInfo(cd);
    }

    /**
     * Returns a {@code String} description of this {@code SettingDescriptorInfo}.
     *
     * @return a string describing this setting, not {@code null}
     */
    @Override
    public String toString() {
        Stringifier s = new Stringifier();
        s.add("name", name);
        s.add("label", label);
        s.add("description", description);
        s.add("typeName", typeName);
        s.add("contentType", contentType);
        s.add("defaultValue", defaultValue);
        return s.toString();
    }
}

jdk/management/jfr/SettingDescriptorInfo.java

 

Or download all of them as a single archive file:

File name: jdk.management.jfr-17.0.5-src.zip
File size: 34348 bytes
Release date: 2022-09-13
Download 

 

JDK 17 jdk.naming.dns.jmod - Naming DNS Module

JDK 17 jdk.management.agent.jmod - Management Agent Module

JDK 17 JMod/Module Files

⇑⇑ FAQ for JDK (Java Development Kit) 17

2023-07-29, 1543👍, 0💬