-
public interface StatisticsRegistry
For 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 StatisticsRegistry
DISABLED
A disabled statistics registry
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StatisticsRegistry
forAssignment(NodeAllocationState.AssignmentState assignment)
Returns a statistics registry, re-scoped for the given assignmentboolean
isConnection()
Is the current registry scoped for connections? Returns true if the stats that are registered will be for connections.boolean
isEnabled()
Returns whether statistics are enabled.void
register(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
-
-