From 883969ceba8fb29e740bccd996ab35d40438d973 Mon Sep 17 00:00:00 2001 From: Alfredo Gutierrez Date: Sat, 24 Aug 2024 18:29:22 -0600 Subject: [PATCH] fixed javadocs and exported metrics to remove warning Signed-off-by: Alfredo Gutierrez --- .../block/server/BlockNodeAppInjectionModule.java | 2 ++ .../server/metrics/MetricsInjectionModule.java | 13 +++++++++++++ server/src/main/java/module-info.java | 1 + 3 files changed, 16 insertions(+) diff --git a/server/src/main/java/com/hedera/block/server/BlockNodeAppInjectionModule.java b/server/src/main/java/com/hedera/block/server/BlockNodeAppInjectionModule.java index 73f72334d..ddfa86927 100644 --- a/server/src/main/java/com/hedera/block/server/BlockNodeAppInjectionModule.java +++ b/server/src/main/java/com/hedera/block/server/BlockNodeAppInjectionModule.java @@ -52,6 +52,8 @@ public interface BlockNodeAppInjectionModule { /** * Provides a block node context singleton. * + * @param config should come from DI + * @param metricsService should come from DI * @return a block node context singleton */ @Singleton diff --git a/server/src/main/java/com/hedera/block/server/metrics/MetricsInjectionModule.java b/server/src/main/java/com/hedera/block/server/metrics/MetricsInjectionModule.java index cf4af8e49..f65d3e8e1 100644 --- a/server/src/main/java/com/hedera/block/server/metrics/MetricsInjectionModule.java +++ b/server/src/main/java/com/hedera/block/server/metrics/MetricsInjectionModule.java @@ -23,15 +23,28 @@ import dagger.Provides; import javax.inject.Singleton; +/** The module used to inject the metrics service and metrics into the application. */ @Module public interface MetricsInjectionModule { + /** + * Provides the metrics service. + * + * @param metrics the metrics to be used by the service + * @return the metrics service + */ @Singleton @Provides static MetricsService provideMetricsService(Metrics metrics) { return new MetricsService(metrics); } + /** + * Provides the metrics. + * + * @param configuration the configuration to be used by the metrics + * @return the metrics + */ @Singleton @Provides static Metrics provideMetrics(Configuration configuration) { diff --git a/server/src/main/java/module-info.java b/server/src/main/java/module-info.java index 4ad339a6f..b19703f2e 100644 --- a/server/src/main/java/module-info.java +++ b/server/src/main/java/module-info.java @@ -10,6 +10,7 @@ exports com.hedera.block.server.persistence.storage.remove; exports com.hedera.block.server.config; exports com.hedera.block.server.mediator; + exports com.hedera.block.server.metrics; exports com.hedera.block.server.data; exports com.hedera.block.server.health;