Openwings API Documentation (v1.1)

net.openwings.availability
Class PerformanceReport

java.lang.Object
  extended bynet.openwings.availability.PerformanceReport
All Implemented Interfaces:
java.io.Serializable

public class PerformanceReport
extends java.lang.Object
implements java.io.Serializable

This class is used to report a performance metric. The status provides an interpretation of what action should be taken based on the metric. The relative metric is provided as a usage percentage. The actual utilization is also provided in the units of the metric.

See Also:
Serialized Form

Field Summary
protected  float denominator
          This is the acutal available resources.
static int GREEN
          This constant is used to indicate normal performance levels.
protected  java.lang.String name
          This is the name of the measurement.
protected  float numerator
          This is the actual resource usage reading.
protected  float percentage
          This indicates the percentage utilization of this component.
static int RED
          This constant is used to indicate a performance availability fault.
protected  int status
          This is the RED, YELLOW, GREEN status indicator.
protected  java.lang.String units
          This is the units of the measurement.
static int YELLOW
          This constant is used to indicate a condition where there is a risk of performance availability fault.
 
Constructor Summary
PerformanceReport()
          Default constructor.
PerformanceReport(java.lang.String name, int status, float percentage, float numerator, float denominator, java.lang.String units)
          This is the primary constructor for this class.
 
Method Summary
 boolean equals(java.lang.Object obj)
          overrides the default equals() method
 float getDenominator()
          This method is used to get the denominator of the measurement.
 java.lang.String getName()
          This method is used to get the name of the performance metric.
 float getNumerator()
          This method is used to get the numerator of the measurement.
 float getPercentUsage()
          This method is used to get the percentage utilization of this metric.
 int getStatus()
          This method is used to get the status of this performance metric.
 java.lang.String getUnits()
          This method is used to get the units of the performance metric.
 int hashCode()
          overrides default hashCode() method.
 void setDenominator(float denominator)
          This method is used to set the denominator of the measurement.
 void setName(java.lang.String name)
          This method is used to set the name of the performance metric.
 void setNumerator(float numerator)
          This method is used to set the numerator of the measurement.
 void setPercentUsage(float percentage)
          This method is used to set the percentage utilization of this metric.
 void setStatus(int status)
          This method is used to set the status of this performance metric.
 void setUnits(java.lang.String units)
          This method is used to set the units of the performance metric.
 java.lang.String toString()
          overrides default toString() method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RED

public static final int RED
This constant is used to indicate a performance availability fault. For example, this could indicate an overloaded component that is not currently accepting connections from service users.

See Also:
Constant Field Values

YELLOW

public static final int YELLOW
This constant is used to indicate a condition where there is a risk of performance availability fault. For example, this could indicate a component that is heavily loaded and needs to shed some of this load.

See Also:
Constant Field Values

GREEN

public static final int GREEN
This constant is used to indicate normal performance levels. For example, this could indicate a component that is within its capabilities and could accept more load.

See Also:
Constant Field Values

status

protected int status
This is the RED, YELLOW, GREEN status indicator.


percentage

protected float percentage
This indicates the percentage utilization of this component.


numerator

protected float numerator
This is the actual resource usage reading.


denominator

protected float denominator
This is the acutal available resources.


units

protected java.lang.String units
This is the units of the measurement.


name

protected java.lang.String name
This is the name of the measurement.

Constructor Detail

PerformanceReport

public PerformanceReport()
Default constructor.


PerformanceReport

public PerformanceReport(java.lang.String name,
                         int status,
                         float percentage,
                         float numerator,
                         float denominator,
                         java.lang.String units)
This is the primary constructor for this class.

Parameters:
name - the name of the measurement.
status - the RED, YELLOW, GREEN status indicator.
percentage - the percentage utilization of this component. This is expressed as a value between 0.0 and 1.0 (inclusive).
numerator - the actual resource usage reading.
denominator - the acutal available resources.
units - the units of the measurement.
Method Detail

getName

public java.lang.String getName()
This method is used to get the name of the performance metric.

Returns:
the name of the performance metric.

setName

public void setName(java.lang.String name)
This method is used to set the name of the performance metric.

Parameters:
name - the name of the performance metric.

getStatus

public int getStatus()
This method is used to get the status of this performance metric.

Returns:
the status of the performance metric: RED, YELLOW, or GREEN

setStatus

public void setStatus(int status)
This method is used to set the status of this performance metric.

Parameters:
status - the status of the performance metric: RED, YELLOW, or GREEN

getPercentUsage

public float getPercentUsage()
This method is used to get the percentage utilization of this metric.

Returns:
the percentage utilization

setPercentUsage

public void setPercentUsage(float percentage)
This method is used to set the percentage utilization of this metric.

Parameters:
percentage - the percentage utilization

getNumerator

public float getNumerator()
This method is used to get the numerator of the measurement.

Returns:
the amount utilized

setNumerator

public void setNumerator(float numerator)
This method is used to set the numerator of the measurement.

Parameters:
numerator - the amount utilized

getDenominator

public float getDenominator()
This method is used to get the denominator of the measurement.

Returns:
the amount availabile

setDenominator

public void setDenominator(float denominator)
This method is used to set the denominator of the measurement.

Parameters:
denominator - the amount availabile

getUnits

public java.lang.String getUnits()
This method is used to get the units of the performance metric.

Returns:
the unit of measurement of the metric

setUnits

public void setUnits(java.lang.String units)
This method is used to set the units of the performance metric.

Parameters:
units - the unit of measurement of the metric

equals

public final boolean equals(java.lang.Object obj)
overrides the default equals() method


hashCode

public final int hashCode()
overrides default hashCode() method.


toString

public java.lang.String toString()
overrides default toString() method.


Openwings API Documentation (v1.1)