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.
  • Field Details

  • Method Details

    • 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.
    • forAssignment

      Returns a statistics registry, re-scoped for the given assignment
      Parameters:
      assignment - the assignment
      Returns:
      a statistics registry