edu.isi.pegasus.planner.visualize.spaceusage
Class JobSpace

java.lang.Object
  extended by edu.isi.pegasus.planner.visualize.spaceusage.JobSpace

public class JobSpace
extends Object

A data class that associates at most three space reading 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  String mName
          The name of the job.
private  List mSpaceList
          The list of Space reading objects.
 
Constructor Summary
JobSpace()
          The default constructor.
JobSpace(String name)
          The overloaded constructor.
 
Method Summary
 void addSpaceReading(Space space, int type)
          Adds a space record for a particular event type.
 Space getSpaceReading(int type)
          Returns the space reading for a particular type of job of event.
 Iterator spaceReadingsIterator()
          Returns the readings iterator.
 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.


mSpaceList

private List mSpaceList
The list of Space reading objects.

Constructor Detail

JobSpace

public JobSpace()
The default constructor.


JobSpace

public JobSpace(String name)
The overloaded constructor.

Parameters:
name - the name of the job
Method Detail

addSpaceReading

public void addSpaceReading(Space space,
                            int type)
Adds a space record for a particular event type.

Parameters:
space - the space record.
type - the type of job

getSpaceReading

public Space getSpaceReading(int type)
Returns the space reading for a particular type of job of event.

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

spaceReadingsIterator

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

Returns:
iterator to space readings.

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.