Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x: Update javadocs of Meter builders to cross reference MeterRegistry.getOrCreate() #8381

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update javadocs of Meter builders to cross reference MeterRegistry.ge…
…tOrCreate()
  • Loading branch information
barchetta committed Feb 14, 2024
commit 1e095ba07c54fd27371c21111e63ae5049a7f319
7 changes: 5 additions & 2 deletions metrics/api/src/main/java/io/helidon/metrics/api/Counter.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 @@ -50,7 +50,10 @@ static Builder builder(String name) {
long count();

/**
* Builder for a new counter.
* Builder for a new counter. The actually building of the counter
* is performed by the registry.
*
* @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