Interface StatisticsRegistry


  • 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.
    • 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 definition
        supplier - 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.