1313/**
1414 * Runtime performance analyzer.
1515 *
16- * @since 0.26 .0
16+ * @since 0.27 .0
1717 */
1818public sealed interface PerformanceAnalyzer permits SimplePerformanceAnalyzer {
1919 /**
2020 * Wraps a data source so SQL calls made through acquired connections are timed.
2121 *
2222 * @param dataSource the source to wrap
2323 * @return the wrapped data source
24- * @since 0.26 .0
24+ * @since 0.27 .0
2525 */
2626 @ Contract (value = "_ -> new" , pure = true )
2727 DataSource wrap (DataSource dataSource );
@@ -31,7 +31,7 @@ public sealed interface PerformanceAnalyzer permits SimplePerformanceAnalyzer {
3131 *
3232 * @param connection the connection to wrap
3333 * @return the wrapped connection
34- * @since 0.26 .0
34+ * @since 0.27 .0
3535 */
3636 @ Contract (value = "_ -> new" , pure = true )
3737 Connection wrap (Connection connection );
@@ -42,7 +42,7 @@ public sealed interface PerformanceAnalyzer permits SimplePerformanceAnalyzer {
4242 * The returned recorder owns the recording and dumps/summarizes it when stopped.
4343 *
4444 * @return the started recorder
45- * @since 0.26 .0
45+ * @since 0.27 .0
4646 */
4747 @ CheckReturnValue
4848 FlightRecorder recordJfrSnapshot ();
@@ -52,7 +52,7 @@ public sealed interface PerformanceAnalyzer permits SimplePerformanceAnalyzer {
5252 *
5353 * @param name the recording name
5454 * @param runnable the runnable to time
55- * @since 0.26 .0
55+ * @since 0.27 .0
5656 */
5757 void record (String name , Runnable runnable );
5858
@@ -64,7 +64,7 @@ public sealed interface PerformanceAnalyzer permits SimplePerformanceAnalyzer {
6464 * @param <T> the return type
6565 * @return the callable result
6666 * @throws Exception if the callable fails
67- * @since 0.26 .0
67+ * @since 0.27 .0
6868 */
6969 <T > T record (String name , Callable <T > callable ) throws Exception ;
7070
@@ -73,7 +73,7 @@ public sealed interface PerformanceAnalyzer permits SimplePerformanceAnalyzer {
7373 *
7474 * @param name the recording name
7575 * @return the started time recording
76- * @since 0.26 .0
76+ * @since 0.27 .0
7777 */
7878 @ CheckReturnValue
7979 TimeRecording startRecording (String name );
@@ -82,29 +82,29 @@ public sealed interface PerformanceAnalyzer permits SimplePerformanceAnalyzer {
8282 * Uploads the currently collected performance data.
8383 *
8484 * @return {@code true} if the upload succeeded
85- * @since 0.26 .0
85+ * @since 0.27 .0
8686 */
8787 boolean flush ();
8888
8989 /**
9090 * Shuts the analyzer down and performs a best-effort final upload.
9191 *
92- * @since 0.26 .0
92+ * @since 0.27 .0
9393 */
9494 void shutdown ();
9595
9696 /**
9797 * Performance analyzer factory.
9898 *
99- * @since 0.26 .0
99+ * @since 0.27 .0
100100 */
101101 sealed interface Factory permits SimplePerformanceAnalyzer .Factory {
102102 /**
103103 * Configures SQL collection.
104104 *
105105 * @param options SQL options
106106 * @return this factory
107- * @since 0.26 .0
107+ * @since 0.27 .0
108108 */
109109 @ Contract (value = "_ -> this" , mutates = "this" )
110110 Factory sql (SqlPerformanceOptions options );
@@ -114,7 +114,7 @@ sealed interface Factory permits SimplePerformanceAnalyzer.Factory {
114114 *
115115 * @param options JFR options
116116 * @return this factory
117- * @since 0.26 .0
117+ * @since 0.27 .0
118118 */
119119 @ Contract (value = "_ -> this" , mutates = "this" )
120120 Factory jfr (JfrPerformanceOptions options );
@@ -123,7 +123,7 @@ sealed interface Factory permits SimplePerformanceAnalyzer.Factory {
123123 * Creates the analyzer.
124124 *
125125 * @return the analyzer
126- * @since 0.26 .0
126+ * @since 0.27 .0
127127 */
128128 @ Contract (value = " -> new" , pure = true )
129129 PerformanceAnalyzer create ();
@@ -132,14 +132,14 @@ sealed interface Factory permits SimplePerformanceAnalyzer.Factory {
132132 /**
133133 * A running JFR recorder.
134134 *
135- * @since 0.26 .0
135+ * @since 0.27 .0
136136 */
137137 sealed interface FlightRecorder extends AutoCloseable permits NoopFlightRecorder , SimpleFlightRecorder {
138138 /**
139139 * Gets the underlying JFR recording for caller mutation.
140140 *
141141 * @return the running recording
142- * @since 0.26 .0
142+ * @since 0.27 .0
143143 */
144144 @ Contract (pure = true )
145145 Recording recording ();
@@ -148,15 +148,15 @@ sealed interface FlightRecorder extends AutoCloseable permits NoopFlightRecorder
148148 * Gets whether this recorder has already been stopped.
149149 *
150150 * @return {@code true} if stopped
151- * @since 0.26 .0
151+ * @since 0.27 .0
152152 */
153153 @ Contract (pure = true )
154154 boolean isClosed ();
155155
156156 /**
157157 * Stops this recording.
158158 *
159- * @since 0.26 .0
159+ * @since 0.27 .0
160160 */
161161 @ Override
162162 void close ();
@@ -165,29 +165,29 @@ sealed interface FlightRecorder extends AutoCloseable permits NoopFlightRecorder
165165 /**
166166 * A manually controlled time recording.
167167 *
168- * @since 0.26 .0
168+ * @since 0.27 .0
169169 */
170170 sealed interface TimeRecording extends AutoCloseable permits SimplePerformanceAnalyzer .SimpleTimeRecording {
171171 /**
172172 * Stops this recording as failed and stores its duration.
173173 *
174- * @since 0.26 .0
174+ * @since 0.27 .0
175175 */
176176 void fail ();
177177
178178 /**
179179 * Gets whether this recording has already been stopped.
180180 *
181181 * @return {@code true} if stopped
182- * @since 0.26 .0
182+ * @since 0.27 .0
183183 */
184184 @ Contract (pure = true )
185185 boolean isClosed ();
186186
187187 /**
188188 * Stops this recording.
189189 *
190- * @since 0.26 .0
190+ * @since 0.27 .0
191191 */
192192 @ Override
193193 void close ();
0 commit comments