-
public interface StatisticsRegistryFor advanced use only; operator authors should not need to access this class. Provides a way to register statistics instrumentation with the framework.
-
-
Field Summary
Fields Modifier and Type Field Description static StatisticsRegistryDISABLEDA disabled statistics registry
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StatisticsRegistryforAssignment(NodeAllocationState.AssignmentState assignment)Returns a statistics registry, re-scoped for the given assignmentbooleanisConnection()Is the current registry scoped for connections? Returns true if the stats that are registered will be for connections.booleanisEnabled()Returns whether statistics are enabled.voidregister(RuntimeStatistic<?> statistic)Registers the given statistics object.<T extends StatisticSupplier>
voidregister(StatisticDefinition<T> definition, T supplier)Registers the given statistics object.
-
-
-
Field Detail
-
DISABLED
static final StatisticsRegistry DISABLED
A disabled statistics registry
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Returns whether statistics are enabled.- Returns:
- whether statistics are enabled.
-
isConnection
boolean isConnection()
Is the current registry scoped for connections? Returns true if the stats that are registered will be for connections. False if for operators.- Returns:
- whether the registry is scoped for connections
-
register
<T extends StatisticSupplier> void register(StatisticDefinition<T> definition, T supplier)
Registers the given statistics object. This call is ignored if statistics are not enabled.- Type Parameters:
T- the type of statistic supplier- Parameters:
definition- the statistic definitionsupplier- the statistic supplier; must be a live statistics object.
-
register
void register(RuntimeStatistic<?> statistic)
Registers the given statistics object. This call is ignored if statistics are not enabled.- Parameters:
statistic- the statistics object; must be a live statistics object.
-
forAssignment
StatisticsRegistry forAssignment(NodeAllocationState.AssignmentState assignment)
Returns a statistics registry, re-scoped for the given assignment- Parameters:
assignment- the assignment- Returns:
- a statistics registry
-
-