Class DciDataRow

java.lang.Object
org.netxms.client.datacollection.DciDataRow

public class DciDataRow extends Object
Single row in DCI data
  • Constructor Details

    • DciDataRow

      public DciDataRow(Date timestamp, Object value)
    • DciDataRow

      public DciDataRow(Date timestamp, double avg, double min, double max)
      Create aggregated data row with avg/min/max values.
      Parameters:
      timestamp - bucket timestamp
      avg - average value
      min - minimum value
      max - maximum value
    • DciDataRow

      public DciDataRow(Date timestamp, double min, double max)
      Create min/max-only band row (no average — produced by tier reads with function=MINMAX). The primary value is set to the midpoint so charts that ignore min/max still render something sensible. Average value is set to NaN to signal that no avg was queried.
      Parameters:
      timestamp - bucket timestamp
      min - minimum value
      max - maximum value
  • Method Details

    • setRawValue

      public void setRawValue(String rawValue)
      Set raw value
      Parameters:
      rawValue - new raw value
    • getTimestamp

      public Date getTimestamp()
      Returns:
      the timestamp
    • getValue

      public Object getValue()
      Returns:
      the value
    • getValueAsString

      public String getValueAsString()
      Returns:
      the value
    • getValueAsLong

      public long getValueAsLong()
      Returns:
      the value
    • getValueAsDouble

      public double getValueAsDouble()
      Returns:
      the value
    • getRawValue

      public String getRawValue()
      Returns:
      raw value
    • invert

      public void invert()
      Invert value
    • isAggregated

      public boolean isAggregated()
      Check if this row contains aggregated data.
      Returns:
      true if aggregated
    • getAvgValue

      public double getAvgValue()
      Get average value (only valid for aggregated rows).
      Returns:
      average value
    • getMinValue

      public double getMinValue()
      Get minimum value (only valid for aggregated rows).
      Returns:
      minimum value
    • getMaxValue

      public double getMaxValue()
      Get maximum value (only valid for aggregated rows).
      Returns:
      maximum value
    • getSampleCount

      public int getSampleCount()
      Get the number of raw samples that contributed to this aggregated bucket. Set to 0 when the row is not from a tier read or when the server is older and does not include sample counts in the response.
      Returns:
      sample count, or 0 if not available
    • setSampleCount

      public void setSampleCount(int sampleCount)
      Set sample count (used by NXCP parser).
      Parameters:
      sampleCount - number of raw samples in the bucket
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: