Class AbstractSampleManager

    • Method Detail

      • getId

        public String getId()
        Description copied from interface: SampleManager
        Provides the id of this manager.
        Must be unique in the application.
        Specified by:
        getId in interface SampleManager
        Returns:
        the id.
      • setPluginInfo

        public void setPluginInfo​(String pluginName,
                                  String featureName,
                                  String id)
        Description copied from interface: PluginAware
        Sets the plugin info relative to the current component.
        Note : The feature name may be null if the targeted component in declared at plugin level.
        Specified by:
        setPluginInfo in interface PluginAware
        Parameters:
        pluginName - Unique identifier for the plugin hosting the extension
        featureName - Unique feature identifier (unique for a given pluginName)
        id - Unique identifier of this component
      • configureRRDDef

        public void configureRRDDef​(org.rrd4j.core.RrdDef rrdDef)
        Description copied from interface: SampleManager
        Provides the definition to use for this RRD file. Called only when the RRD file is about to be created.
        Specified by:
        configureRRDDef in interface SampleManager
        Parameters:
        rrdDef - the Round Robin Database definition.
      • _configureDatasources

        protected abstract void _configureDatasources​(org.rrd4j.core.RrdDef rrdDef)
        Provides the data sources.
        Parameters:
        rrdDef - the Round Robin Database definition.
      • _registerDatasources

        protected void _registerDatasources​(org.rrd4j.core.RrdDef rrdDef,
                                            String dsName,
                                            org.rrd4j.DsType dsType,
                                            double minValue,
                                            double maxValue)
        Register a new data source where heartbeat property is set internally.
        Parameters:
        rrdDef - the Round Robin Database definition.
        dsName - the data source name.
        dsType - the data source type.
        minValue - the minimal acceptable value. Use Double.NaN if unknown.
        maxValue - the maximal acceptable value. Use Double.NaN if unknown.
      • collect

        public Map<String,​Objectcollect​(org.rrd4j.core.Sample sample)
                                         throws IOException
        Description copied from interface: SampleManager
        Collect data into the Round Robin Database.
        Specified by:
        collect in interface SampleManager
        Parameters:
        sample - the sample to collect.
        Returns:
        The collected values for each datasource name.
        Throws:
        IOException - thrown in case of I/O error.
      • _internalCollect

        protected abstract Map<String,​Object_internalCollect​(org.rrd4j.core.Sample sample)
                                                              throws IOException
        Collect data into the Round Robin Database.
        Parameters:
        sample - the sample to collect.
        Returns:
        The collected values for each datasource name.
        Throws:
        IOException - thrown in case of I/O error.
      • _setCommonParameters

        protected void _setCommonParameters​(org.rrd4j.graph.RrdGraphDef graphDef)
        Set common graph definition parameters (graph style, ...)
        Parameters:
        graphDef - the prepared graph definition.
      • _configureValueRange

        protected void _configureValueRange​(org.rrd4j.graph.RrdGraphDef graphDef)
        Configure the value range to be displayed.
        Default implementation set min value to 0.
        Parameters:
        graphDef - the graph definition.
      • _getGraphTitle

        protected abstract String _getGraphTitle()
        Provide the graph title.
        Returns:
        the graph title.