org.gridlab.gat.monitoring
Class MetricEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.gridlab.gat.monitoring.MetricEvent
All Implemented Interfaces:
Serializable

public class MetricEvent
extends EventObject

An instance of this class represents an metric event.

A metric event occurs whenever the monitored resource, be it a job or a hardware resource, sends out an event to the monitoring system. This can encompass almost any type of event from disk space running out to memory becoming available. The various events are defined by the various sensors. This topic is covered in more detail in the Metric documentation.

See Also:
Serialized Form

Constructor Summary
MetricEvent(Object source, Object value, Metric metric, long eventTime)
          Constructs a MetricEvent with the specified properties
 
Method Summary
 long getEventTime()
          This method returns the number of milliseconds after January 1, 1970, 00:00:00 GMT when the event happened.
 Metric getMetric()
          This method returns an instance of the Metric to which this MetricEvent corresponds.
 Object getValue()
          This method returns the value corresponding to this MetricEvent.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetricEvent

public MetricEvent(Object source,
                   Object value,
                   Metric metric,
                   long eventTime)
Constructs a MetricEvent with the specified properties

Parameters:
source - The source of the MetricEvent
value - The value of the MetricEvent
metric - The Metric of the MetricEvent
eventTime - The number of milliseconds after January 1, 1970, 00:00:00 GMT when the MetricEvent happened.
Method Detail

getMetric

public Metric getMetric()
This method returns an instance of the Metric to which this MetricEvent corresponds.

Returns:
A Metric corresponding to this MetricEvent

getValue

public Object getValue()
This method returns the value corresponding to this MetricEvent.

Returns:
An Object which is the value of this MetricEvent.

getEventTime

public long getEventTime()
This method returns the number of milliseconds after January 1, 1970, 00:00:00 GMT when the event happened.

Returns:
A long, the number of milliseconds after January 1, 1970, 00:00:00 GMT when the event happened.

toString

public String toString()
Overrides:
toString in class EventObject