edu.isi.pegasus.planner.visualize
Class JobMeasurements

java.lang.Object
  extended by edu.isi.pegasus.planner.visualize.JobMeasurements

public class JobMeasurements
extends Object

A data class that associates at most three measurements with the job corresponding to the GRIDSTART_PREJOB, GRIDSTART_MAINJOB and GRIDSTART_POSTJOB.

Version:
$Revision: 2563 $
Author:
Karan Vahi vahi@isi.edu

Field Summary
static int GRIDSTART_MAINJOB_EVENT_TYPE
          The MAINJOB data index.
static int GRIDSTART_POSTJOB_EVENT_TYPE
          The POSTJOB data index.
static int GRIDSTART_PREJOB_EVENT_TYPE
          The PREJOB data index.
private  List mMeasurementList
          The list of Measurement objects.
private  String mName
          The name of the job.
private  List mTimeList
          The corresponding list of Date objects signifying the times at which an event happened.
 
Constructor Summary
JobMeasurements()
          The default constructor.
JobMeasurements(String name)
          The overloaded constructor.
 
Method Summary
 Measurement getMeasurement(int type)
          Returns the measurement corresponding to the event type.
 Iterator measurementsIterator()
          Returns the readings iterator.
 void setMeasurement(Measurement measurement, int type)
          Adds a measurement for a particular event type.
 void setTime(Date time, int type)
          Adds a time for a particular event type.
 String toString()
          Returns a textual description of the object.
 boolean typeInRange(int type)
          Returns a boolean indicating whether the event type is in range of not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GRIDSTART_PREJOB_EVENT_TYPE

public static final int GRIDSTART_PREJOB_EVENT_TYPE
The PREJOB data index.

See Also:
Constant Field Values

GRIDSTART_MAINJOB_EVENT_TYPE

public static final int GRIDSTART_MAINJOB_EVENT_TYPE
The MAINJOB data index.

See Also:
Constant Field Values

GRIDSTART_POSTJOB_EVENT_TYPE

public static final int GRIDSTART_POSTJOB_EVENT_TYPE
The POSTJOB data index.

See Also:
Constant Field Values

mName

private String mName
The name of the job.


mMeasurementList

private List mMeasurementList
The list of Measurement objects.


mTimeList

private List mTimeList
The corresponding list of Date objects signifying the times at which an event happened.

Constructor Detail

JobMeasurements

public JobMeasurements()
The default constructor.


JobMeasurements

public JobMeasurements(String name)
The overloaded constructor.

Parameters:
name - the name of the job
Method Detail

setMeasurement

public void setMeasurement(Measurement measurement,
                           int type)
Adds a measurement for a particular event type.

Parameters:
measurement - the measurement to be associated
type - the event type

setTime

public void setTime(Date time,
                    int type)
Adds a time for a particular event type.

Parameters:
time - the time
type - the event type

getMeasurement

public Measurement getMeasurement(int type)
Returns the measurement corresponding to the event type.

Parameters:
type - event type.
Returns:
Measurement object if data exists else null

measurementsIterator

public Iterator measurementsIterator()
Returns the readings iterator. Values can be null.

Returns:
iterator to measurements.

typeInRange

public boolean typeInRange(int type)
Returns a boolean indicating whether the event type is in range of not.

Parameters:
type - the type value

toString

public String toString()
Returns a textual description of the object.

Overrides:
toString in class Object
Returns:
description


Copyright © 2011 The University of Southern California. All Rights Reserved.