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

Remove setFlushInterval and getFlushInterval

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      jfr
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      The methods have not been released and are unknown to the pubilc. They can therefore be removed without a compatibility risk.
    • Interface Kind:
      Java API
    • Scope:
      JDK

      Description

      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);
      -    }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: