Skip to content

Commit

Permalink
4.x: Update javadocs of Meter builders to cross reference MeterRegist…
Browse files Browse the repository at this point in the history
…ry.getOrCreate() (#8381)
  • Loading branch information
barchetta authored Feb 15, 2024
1 parent a690501 commit ab60ba4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,6 +51,8 @@ static Builder builder(String name) {

/**
* Builder for a new counter.
*
* @see MeterRegistry#getOrCreate(Meter.Builder)
*/
interface Builder extends Meter.Builder<Builder, Counter> {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -92,6 +92,8 @@ static Builder builder(String name) {

/**
* Builder for a {@link io.helidon.metrics.api.DistributionSummary}.
*
* @see MeterRegistry#getOrCreate(Meter.Builder)
*/
interface Builder extends Meter.Builder<Builder, DistributionSummary> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -45,6 +45,8 @@ static <T> Builder<?> builder(String name, T stateObject, Function<T, Long> fn)
/**
* Builder for a {@link io.helidon.metrics.api.FunctionalCounter}.
*
* @see MeterRegistry#getOrCreate(Meter.Builder)
*
* @param <T> type of the state object
*/
interface Builder<T> extends Meter.Builder<Builder<T>, FunctionalCounter> {
Expand Down
4 changes: 3 additions & 1 deletion metrics/api/src/main/java/io/helidon/metrics/api/Gauge.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -65,6 +65,8 @@ static <N extends Number> Builder<N> builder(String name, Supplier<N> numberSupp
/**
* Builder for a new gauge.
*
* @see MeterRegistry#getOrCreate(Meter.Builder)
*
* @param <N> specific subtype of {@code Number} for the gauge this builder will produce
*/
interface Builder<N extends Number> extends Meter.Builder<Builder<N>, Gauge<N>> {
Expand Down
4 changes: 3 additions & 1 deletion metrics/api/src/main/java/io/helidon/metrics/api/Meter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -111,6 +111,8 @@ public String typeName() {
* We do not want developers to see a {@code build()} operation that they should not invoke.
* </p>
*
* @see MeterRegistry#getOrCreate(Builder)
*
* @param <B> type of the builder
* @param <M> type of the meter the builder creates
*/
Expand Down
4 changes: 3 additions & 1 deletion metrics/api/src/main/java/io/helidon/metrics/api/Timer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -189,6 +189,8 @@ interface Sample {

/**
* Builder for a new {@link io.helidon.metrics.api.Timer}.
*
* @see MeterRegistry#getOrCreate(Meter.Builder)
*/
interface Builder extends Meter.Builder<Builder, Timer> {

Expand Down

0 comments on commit ab60ba4

Please sign in to comment.