Interface DataHolder

All Known Implementing Classes:
DataProcessor, RrdGraphDef

public interface DataHolder
Since:
3;7
Author:
Fabrice Bacchella
  • Field Details

  • Method Details

    • isPoolUsed

      boolean isPoolUsed()
      Returns boolean value representing RrdDbPool usage policy.
      Returns:
      true, if the pool will be used internally to fetch data from RRD files, false otherwise.
    • setPoolUsed

      void setPoolUsed​(boolean poolUsed)
      Sets the RrdDbPool usage policy.
      Parameters:
      poolUsed - true, if the pool will be used to fetch data from RRD files, false otherwise.
    • getPool

      RrdDbPool getPool()
    • setPool

      void setPool​(RrdDbPool pool)
      Defines the RrdDbPool to use. If not defined, but {setPoolUsed(boolean) set to true, the default RrdDbPool.getInstance() will be used.
      Parameters:
      pool - an optional pool to use.
    • setTimeZone

      void setTimeZone​(TimeZone tz)
      Set the time zone used for the legend.
      Parameters:
      tz - the time zone to set
    • getTimeZone

      TimeZone getTimeZone()
    • setEndTime

      void setEndTime​(long time)
      Sets the time when the graph should end. Time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time.
      Parameters:
      time - Ending time for the graph in seconds since epoch
    • getEndTime

      long getEndTime()
      Returns ending timestamp.
      Returns:
      Ending timestamp in seconds
    • setStartTime

      void setStartTime​(long time)
      Sets the time when the graph should start. Time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time.
      Parameters:
      time - Starting time for the graph in seconds since epoch
    • getStartTime

      long getStartTime()
      Returns starting timestamp.
      Returns:
      Starting timestamp in seconds
    • setTimeSpan

      void setTimeSpan​(long startTime, long endTime)
      Sets starting and ending time for the for the graph. Timestamps in seconds since epoch are required. Negative numbers are relative to the current time.
      Parameters:
      startTime - Starting time in seconds since epoch
      endTime - Ending time in seconds since epoch
    • setStep

      void setStep​(long step)
      Set the step for timestamp interval.
    • getStep

      long getStep()
      Returns the time step used for timestamp interval.
      Returns:
      Step used for data processing.
    • datasource

      void datasource​(String name, String rrdPath, String dsName, ConsolFun consolFun)
      Defines virtual datasource. This datasource can then be used in other methods like datasource(String, String).
      Parameters:
      name - Source name
      rrdPath - Path to RRD file
      dsName - Datasource name in the specified RRD file
      consolFun - Consolidation function (AVERAGE, MIN, MAX, LAST)
    • datasource

      void datasource​(String name, URI rrdUri, String dsName, ConsolFun consolFun)
      Defines virtual datasource. This datasource can then be used in other methods like datasource(String, String).
      Parameters:
      name - Source name
      rrdUri - rrdUri to RRD file
      dsName - Datasource name in the specified RRD file
      consolFun - Consolidation function (AVERAGE, MIN, MAX, LAST)
    • datasource

      void datasource​(String name, String rrdPath, String dsName, ConsolFun consolFun, RrdBackendFactory backend)
      Defines virtual datasource. This datasource can then be used in other methods like datasource(String, String).
      Parameters:
      name - Source name
      rrdPath - Path to RRD file
      dsName - Datasource name in the specified RRD file
      consolFun - Consolidation function (AVERAGE, MIN, MAX, LAST)
      backend - Backend to be used while fetching data from a RRD file.
    • datasource

      void datasource​(String name, URI rrdUri, String dsName, ConsolFun consolFun, RrdBackendFactory backend)
      Defines virtual datasource. This datasource can then be used in other methods like datasource(String, String).
      Parameters:
      name - Source name
      rrdUri - URI to RRD file
      dsName - Datasource name in the specified RRD file
      consolFun - Consolidation function (AVERAGE, MIN, MAX, LAST)
      backend - Backend to be used while fetching data from a RRD file.
    • datasource

      void datasource​(String name, String rpnExpression)
      Create a new virtual datasource by evaluating a mathematical expression, specified in Reverse Polish Notation (RPN).
      Parameters:
      name - Source name
      rpnExpression - RPN expression.
    • datasource

      void datasource​(String name, String defName, Variable var)
      Creates a datasource that performs a variable calculation on an another named datasource to yield a single combined timestamp/value. Requires that the other datasource has already been defined; otherwise, it'll end up with no data
      Parameters:
      name - - the new virtual datasource name
      defName - - the datasource from which to extract the percentile. Must be a previously defined virtual datasource
      var - - a new instance of a Variable used to do the calculation
    • datasource

      void datasource​(String name, IPlottable plottable)
      Creates a new (plottable) datasource. Datasource values are obtained from the given plottable object.
      Parameters:
      name - Source name.
      plottable - IPlottable object.
    • datasource

      void datasource​(String name, FetchData fetchData)
      Creates a new 'fetched' datasource. Datasource values are obtained from the given FetchData object.
      Parameters:
      name - Source name.
      fetchData - FetchData object.
    • datasource

      void datasource​(String name, String dsName, FetchData fetchData)
      Creates a new 'fetched' datasource. Datasource values are obtained from the given FetchData object. Values will be extracted from the datasource dsName in the fetchData
      Parameters:
      name - Source name.
      dsName - Source name in fetchData.
      fetchData - FetchData object.