From aaa782adee69ec9c24b7519b351ad276e865ec9d Mon Sep 17 00:00:00 2001 From: Alfredo Gutierrez Date: Tue, 27 Aug 2024 13:26:34 -0600 Subject: [PATCH] annotate interface methods with non null Signed-off-by: Alfredo Gutierrez --- .../java/com/hedera/block/server/metrics/MetricsService.java | 5 +++++ 1 file changed, 5 insertions(+) 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 c152a3dd8..6269a74ea 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 @@ -18,6 +18,7 @@ import com.swirlds.metrics.api.Counter; import com.swirlds.metrics.api.LongGauge; +import edu.umd.cs.findbugs.annotations.NonNull; /** Use member variables of this class to update metric data for the Hedera Block Node. */ public interface MetricsService { @@ -26,6 +27,7 @@ public interface MetricsService { * * @return use this metric to increase the counter of block items received */ + @NonNull Counter liveBlockItems(); /** @@ -33,6 +35,7 @@ public interface MetricsService { * * @return use this counter to increase the amount of blocks persisted to disk */ + @NonNull Counter blocksPersisted(); /** @@ -40,6 +43,7 @@ public interface MetricsService { * * @return use this metric to increase the counter of single blocks retrieved */ + @NonNull Counter singleBlocksRetrieved(); /** @@ -47,5 +51,6 @@ public interface MetricsService { * * @return Use this to increase or decrease the amount of current subscribers to the live stream */ + @NonNull LongGauge subscribers(); }