Class SolrMetricReporter

    • Field Detail

      • registryName

        protected final String registryName
      • enabled

        protected boolean enabled
      • period

        protected int period
    • Constructor Detail

      • SolrMetricReporter

        protected SolrMetricReporter​(SolrMetricManager metricManager,
                                     String registryName)
        Create a reporter for metrics managed in a named registry.
        Parameters:
        registryName - registry to use, one of registries managed by SolrMetricManager
    • Method Detail

      • doInit

        protected abstract void doInit()
        Reporter initialization implementation.
      • setEnabled

        public void setEnabled​(Boolean enabled)
        Enable reporting, defaults to true. init(PluginInfo) checks this flag before calling doInit() to initialize reporting.
        Parameters:
        enabled - - whether or not reporting is to be enabled
      • setPeriod

        public void setPeriod​(int period)
        Parameters:
        period - - in seconds
      • getPeriod

        public int getPeriod()
        Returns:
        period, in seconds
      • getPluginInfo

        public PluginInfo getPluginInfo()
        Get the effective PluginInfo instance that was used for initialization of this plugin.
        Returns:
        plugin info, or null if not yet initialized.
      • validate

        protected abstract void validate()
                                  throws IllegalStateException
        Validates that the reporter has been correctly configured.
        Throws:
        IllegalStateException - if the reporter is not properly configured