Java Code Examples for jdk.jfr.internal.PlatformRecorder#removeListener()

The following examples show how to use jdk.jfr.internal.PlatformRecorder#removeListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlightRecorder.java    From dragonwell8_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Removes a recorder listener.
 * <p>
 * If the same listener is added multiple times, only one instance is
 * removed.
 *
 * @param changeListener listener to remove, not {@code null}
 *
 * @throws SecurityException if a security manager exists and the caller
 *         does not have
 *         {@code FlightRecorderPermission("accessFlightRecorder")}
 *
 * @return {@code true}, if the listener could be removed, {@code false}
 *         otherwise
 */
public static boolean removeListener(FlightRecorderListener changeListener) {
    Objects.requireNonNull(changeListener);
    Utils.checkAccessFlightRecorder();
    if (JVMSupport.isNotAvailable()) {
        return false;
    }

    return PlatformRecorder.removeListener(changeListener);
}
 
Example 2
Source File: FlightRecorder.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Removes a recorder listener.
 * <p>
 * If the same listener is added multiple times, only one instance is
 * removed.
 *
 * @param changeListener listener to remove, not {@code null}
 *
 * @throws SecurityException if a security manager exists and the caller
 *         does not have
 *         {@code FlightRecorderPermission("accessFlightRecorder")}
 *
 * @return {@code true}, if the listener could be removed, {@code false}
 *         otherwise
 */
public static boolean removeListener(FlightRecorderListener changeListener) {
    Objects.requireNonNull(changeListener);
    Utils.checkAccessFlightRecorder();
    if (JVMSupport.isNotAvailable()) {
        return false;
    }

    return PlatformRecorder.removeListener(changeListener);
}
 
Example 3
Source File: FlightRecorder.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Removes a recorder listener.
 * <p>
 * If the same listener is added multiple times, only one instance is
 * removed.
 *
 * @param changeListener listener to remove, not {@code null}
 *
 * @throws SecurityException if a security manager exists and the caller
 *         does not have
 *         {@code FlightRecorderPermission("accessFlightRecorder")}
 *
 * @return {@code true}, if the listener could be removed, {@code false}
 *         otherwise
 */
public static boolean removeListener(FlightRecorderListener changeListener) {
    Objects.requireNonNull(changeListener);
    Utils.checkAccessFlightRecorder();
    if (JVMSupport.isNotAvailable()) {
        return false;
    }

    return PlatformRecorder.removeListener(changeListener);
}