Class ChartDataCache

java.lang.Object
org.jppf.ui.monitoring.charts.ChartDataCache

public final class ChartDataCache extends Object
A cache for charts data, implemented as a singleton.
Author:
Laurent Cohen
  • Method Details

    • getInstance

      public static ChartDataCache getInstance()
      Returns:
      the singleton instance of this class.
    • addFields

      public void addFields(Fields[] fields, StatsHandler handler)
      Add the specified fields.
      Parameters:
      fields - the fields to add..
      handler - holds the updated data.
    • removeFields

      public void removeFields(Fields[] fields)
      Remove fields that are no longer used.
      Parameters:
      fields - the fields to add.
    • update

      public void update(StatsHandler handler)
      Update the values of the fields.
      Parameters:
      handler - holds the updated data.
    • getData

      public Map<Fields,List<Double>> getData(Fields[] fields)
      Get the available data for the specified fields.
      Parameters:
      fields - the fields for which to get data.
      Returns:
      a mapping of fields to the associated data.