From d305d3319db68a06e14f9fc7c1214ed270681317 Mon Sep 17 00:00:00 2001 From: Matt Peterson Date: Mon, 12 Aug 2024 09:28:03 -0600 Subject: [PATCH] fix: updated javadoc Signed-off-by: Matt Peterson --- .../server/config/BlockNodeContextFactory.java | 3 +++ .../block/server/metrics/MetricsService.java | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/server/src/main/java/com/hedera/block/server/config/BlockNodeContextFactory.java b/server/src/main/java/com/hedera/block/server/config/BlockNodeContextFactory.java index 1e400771c..7cd7905b9 100644 --- a/server/src/main/java/com/hedera/block/server/config/BlockNodeContextFactory.java +++ b/server/src/main/java/com/hedera/block/server/config/BlockNodeContextFactory.java @@ -36,8 +36,11 @@ public class BlockNodeContextFactory { private BlockNodeContextFactory() {} /** + * Use the create method to build a singleton block node context to manage system-wide metrics. + * * @return an instance of {@link BlockNodeContext} which holds {@link Configuration}, {@link * Metrics} and {@link MetricsService} for the rest of the application to use. + * @throws IOException when the java libraries fail to read information from a configuration source. */ public static BlockNodeContext create() throws IOException { final Configuration configuration = getConfiguration(); diff --git a/server/src/main/java/com/hedera/block/server/metrics/MetricsService.java b/server/src/main/java/com/hedera/block/server/metrics/MetricsService.java index 4a5d90c9b..5feb0d0ab 100644 --- a/server/src/main/java/com/hedera/block/server/metrics/MetricsService.java +++ b/server/src/main/java/com/hedera/block/server/metrics/MetricsService.java @@ -60,9 +60,24 @@ public class MetricsService { /** An example counter. */ public final Counter exampleCounter; + /** + * Update the counter of live block items transiting via the live stream. + */ public final Counter liveBlockItems; + + /** + * Update the counter of blocks persisted to storage. + */ public final Counter blocksPersisted; + + /** + * Update the counter of single blocks retrieved from storage. + */ public final Counter singleBlocksRetrieved; + + /** + * Update the gauge of subscribers currently consuming to the live stream. + */ public final LongGauge subscribers; /**