Class ConnectionDataHolder

java.lang.Object
org.jppf.ui.monitoring.data.ConnectionDataHolder

public class ConnectionDataHolder extends Object
Instances of this class hold and manage statistics data snapshots for a single driver connection.
Author:
Laurent Cohen
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConnectionDataHolder(int capacity, org.jppf.client.monitoring.topology.TopologyDriver driver)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cleanup the resources used by this object.
    int
     
    Get the data snapshot mapping fields to their corresponding double values, at the specified position.
    Get a cache of the data snapshots fields maps to their corresponding double values.
    org.jppf.client.monitoring.topology.TopologyDriver
    Get the topology data associated with the driver connection.
    Get the latest data snapshot mapping fields to their corresponding double values.
    int
    Get the size of the list of statistic snapshots.
    void
    setCapacity(int capacity)
    Set the maximum size of the snapshots lists.
    void
    update(org.jppf.utils.stats.JPPFStatistics stats, org.jppf.management.diagnostics.HealthSnapshot snapshot)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConnectionDataHolder

      public ConnectionDataHolder(int capacity, org.jppf.client.monitoring.topology.TopologyDriver driver)
      Default constructor.
      Parameters:
      capacity - the maximum number of snapshots held by this data holder.
      driver - a the drivr for which to get the statistics.
  • Method Details

    • getSize

      public int getSize()
      Get the size of the list of statistic snapshots.
      Returns:
      the number of snapshots current held.
    • getDoubleValuesMaps

      public List<Map<Fields,Double>> getDoubleValuesMaps()
      Get a cache of the data snapshots fields maps to their corresponding double values.
      Returns:
      a list of maps of field names to double values.
    • getLatestDoubleValues

      public Map<Fields,Double> getLatestDoubleValues()
      Get the latest data snapshot mapping fields to their corresponding double values.
      Returns:
      a map of field names to double values.
      Since:
      5.0
    • getDoubleValuesAt

      public Map<Fields,Double> getDoubleValuesAt(int pos)
      Get the data snapshot mapping fields to their corresponding double values, at the specified position.
      Parameters:
      pos - the position of the values to get in the list of snapshots.
      Returns:
      a map of field names to double values if it exists, null otherwise.
    • getDriver

      public org.jppf.client.monitoring.topology.TopologyDriver getDriver()
      Get the topology data associated with the driver connection.
      Returns:
      a TopologyDriver object.
      Since:
      5.0
    • update

      public void update(org.jppf.utils.stats.JPPFStatistics stats, org.jppf.management.diagnostics.HealthSnapshot snapshot)
      Parameters:
      stats - the data snapshot to map.
      snapshot - the health data snapshot to map.
    • getCapacity

      public int getCapacity()
      Returns:
      the maximum size of the snapshots lists.
    • setCapacity

      public void setCapacity(int capacity)
      Set the maximum size of the snapshots lists.
      Parameters:
      capacity - the size to set.
    • close

      public void close()
      Cleanup the resources used by this object.