--- a/src/jdk.jfr/share/classes/jdk/jfr/Recording.java Wed Sep 25 22:40:41 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/Recording.java Thu Sep 26 15:13:04 2019 +0200
@@ -413,27 +413,31 @@
internal.setMaxSize(maxSize);
}
- /**
- * Determines how often events are made available for streaming.
- *
- * @param interval the interval at which events are made available for streaming.
- *
- * @throws IllegalArgumentException if <code>interval</code> is negative
- *
- * @throws IllegalStateException if the recording is in the {@code CLOSED} state
- */
- public void setFlushInterval(Duration interval) {
- Objects.nonNull(interval);
- if (interval.isNegative()) {
- throw new IllegalArgumentException("Stream interval can't be negative");
+ /**
+ * Determines how often events are made available for streaming.
+ *
+ * @param interval the interval at which events are made available for streaming.
+ *
+ * @throws IllegalArgumentException if <code>interval</code> is negative
+ *
+ * @throws IllegalStateException if the recording is in the {@code CLOSED} state
+ *
+ * @since 14
+ */
+ public void setFlushInterval(Duration interval) {
+ Objects.nonNull(interval);
+ if (interval.isNegative()) {
+ throw new IllegalArgumentException("Stream interval can't be negative");
+ }
+ internal.setFlushInterval(interval);
}
- internal.setFlushInterval(interval);
- }
/**
* Returns how often events are made available for streaming purposes.
*
* @return the flush interval, or {@code null} if no interval has been set
+ *
+ * @since 14
*/
public Duration getFlushInterval() {
return internal.getFlushInterval();