Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8236265

Remove setFlushInterval and getFlushInterval

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 14
    • hotspot
    • None
    • jfr
    • minimal
    • The methods have not been released and are unknown to the pubilc. They can therefore be removed without a compatibility risk.
    • Java API
    • JDK

      Summary

      Remove jdk.jfr.Recording::setFlushInterval/duration), jdk.jfr.Recording::getFlushInterval() and jdk.jfr.RecordingStream::setFlushInterval that was introduced with JEP 349: JFR Event Streaming.

      Problem

      Purpose of the setFlushInterval(Duration) and getFlusInterval() methods was to control the rate at which data are flushed to disk. A higher flush rate means less overhead.

      After integration integration of the JEP, the conclusion is that the overhead using a value of 1 s is not measurable and the methods don't carry weight to be part of the API.

      Solution

      Remove or make methods package private so they are not exposed in the API.

      Specification

      Class: jdk.jfr.Recording:
      
      -    public void setFlushInterval(Duration interval) {
      +    /* package private */ void setFlushInterval(Duration interval) {
      
      -    public Duration getFlushInterval() {
      +    /* package private */ Duration getFlushInterval() {
      
      Class: jdk.jfr.consumer.RecordingStream
      
      -    /**
      -     * Determines how often events are made available for streaming.
      -     *
      -     * @param interval the interval at which events are made available to the
      -     *        stream, no {@code null}
      -     *
      -     * @throws IllegalArgumentException if {@code interval} is negative
      -     *
      -     * @throws IllegalStateException if the stream is closed
      -     */
      -    public void setFlushInterval(Duration interval) {
      -        recording.setFlushInterval(interval);
      -    }

            egahlin Erik Gahlin
            egahlin Erik Gahlin
            Markus Grönlund
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: