Skip to content

Commit

Permalink
annotate interface methods with non null
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed Aug 27, 2024
1 parent a2f3669 commit aaa782a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -26,26 +27,30 @@ public interface MetricsService {
*
* @return use this metric to increase the counter of block items received
*/
@NonNull
Counter liveBlockItems();

/**
* Update the counter of blocks persisted to storage.
*
* @return use this counter to increase the amount of blocks persisted to disk
*/
@NonNull
Counter blocksPersisted();

/**
* Update the counter of single blocks retrieved from storage.
*
* @return use this metric to increase the counter of single blocks retrieved
*/
@NonNull
Counter singleBlocksRetrieved();

/**
* Update the gauge of subscribers currently consuming to the live stream.
*
* @return Use this to increase or decrease the amount of current subscribers to the live stream
*/
@NonNull
LongGauge subscribers();
}

0 comments on commit aaa782a

Please sign in to comment.