Package org.jppf.ui.monitoring.data
Class ConnectionDataHolder
java.lang.Object
org.jppf.ui.monitoring.data.ConnectionDataHolder
Instances of this class hold and manage statistics data snapshots for a single driver connection.
- Author:
- Laurent Cohen
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionDataHolder(int capacity, org.jppf.client.monitoring.topology.TopologyDriver driver) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Cleanup the resources used by this object.intgetDoubleValuesAt(int pos) 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.TopologyDriverGet the topology data associated with the driver connection.Get the latest data snapshot mapping fields to their corresponding double values.intgetSize()Get the size of the list of statistic snapshots.voidsetCapacity(int capacity) Set the maximum size of the snapshots lists.voidupdate(org.jppf.utils.stats.JPPFStatistics stats, org.jppf.management.diagnostics.HealthSnapshot snapshot)
-
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
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
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
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,
nullotherwise.
-
getDriver
public org.jppf.client.monitoring.topology.TopologyDriver getDriver()Get the topology data associated with the driver connection.- Returns:
- a
TopologyDriverobject. - 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.
-