edu.isi.pegasus.planner.catalog.site.classes
Class GridGateway

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.site.classes.SiteData
      extended by edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
          extended by edu.isi.pegasus.planner.catalog.site.classes.GridGateway
All Implemented Interfaces:
Cloneable

public class GridGateway
extends AbstractSiteData

This class describes the Grid Gateway into a site.

Version:
$Revision: 2511 $
Author:
Karan Vahi

Nested Class Summary
static class GridGateway.JOB_TYPE
          An enumeration of types of jobs handled by an instance of a grid gateway.
static class GridGateway.SCHEDULER_TYPE
          An enumeration of valid schedulers on the grid gateway.
static class GridGateway.TYPE
          An enumeration of valid types of grid gateway.
 
Field Summary
private  SysInfo.Architecture mArch
          An optional architecture type for the grid gateway.
private  String mContact
          The contact string for the grid gateway.
private  String mGlibc
          Optional information about the glibc.
private  int mIdleNodes
          The number of idle nodes.
private  GridGateway.JOB_TYPE mJobType
          The type of jobs that this grid gateway can accept.
private  SysInfo.OS mOS
          An optional os type for the grid gateway.
private  String mOSRelease
          Optional information about the os release.
private  String mOSVersion
          Optional information about the version.
private  GridGateway.SCHEDULER_TYPE mScheduler
          The scheduler type with which it interfaces.
private  int mTotalNodes
          The number of total nodes
private  GridGateway.TYPE mType
          The grid type associated with this instance.
 
Constructor Summary
GridGateway()
          The default constructor.
GridGateway(GridGateway.TYPE type, String contact, GridGateway.SCHEDULER_TYPE scheduler)
          The overloaded constructor.
 
Method Summary
 Object clone()
          Returns the clone of the object.
 SysInfo.Architecture getArchitecture()
          Returns the architecture of the nodes that this grid gateway talks to.
 String getContact()
          Returns the contact string for the Grid gateway
 String getGlibc()
          Returns the glibc version of the site.
 int getIdleNodes()
          Returns the total number of nodes that this grid gateway talks to.
 GridGateway.JOB_TYPE getJobType()
          Returns the type of jobs that run via this grid gateway.
 SysInfo.OS getOS()
          Returns the OS of the nodes that this grid gateway talks to.
 String getOSRelease()
          Returns the OS release of the site.
 String getOSVersion()
          Returns the OS version of the site.
 GridGateway.SCHEDULER_TYPE getScheduler()
          Returns the the underlying scheduler that gateway talks to.
 int getTotalNodes()
          Returns the total number of nodes that this grid gateway talks to.
 GridGateway.TYPE getType()
          Returns the type of jobs that run via this grid gateway.
 void setArchitecture(SysInfo.Architecture arch)
          Sets the architecture of the nodes that this grid gateway talks to.
 void setContact(String contact)
          Sets the contact string for the Grid gateway
 void setGlibc(String version)
          Sets the glibc version on the site.
 void setIdleNodes(int num)
          Sets the number of idle nodes that this grid gateway talks to.
 void setIdleNodes(String num)
          Sets the number of idle nodes that this grid gateway talks to.
 void setJobType(GridGateway.JOB_TYPE type)
          Sets the type of jobs that run via this grid gateway.
 void setOS(SysInfo.OS os)
          Sets the OS of the nodes that this grid gateway talks to.
 void setOSRelease(String release)
          Sets the OS release of the site.
 void setOSVersion(String version)
          Sets the OS version of the site.
 void setScheduler(GridGateway.SCHEDULER_TYPE scheduler)
          Sets the the underlying scheduler that gateway talks to.
 void setScheduler(String value)
          Sets the the underlying scheduler that gateway talks to.
 void setTotalNodes(int num)
          Sets the total number of nodes that this grid gateway talks to.
 void setTotalNodes(String num)
          Sets the number of total nodes that this grid gateway talks to.
 void setType(GridGateway.TYPE type)
          Sets the type of grid gateway.
 void toXML(Writer writer, String indent)
          Writes out the xml description of the object.
 
Methods inherited from class edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
toString, toXML, writeAttribute
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mType

private GridGateway.TYPE mType
The grid type associated with this instance.


mContact

private String mContact
The contact string for the grid gateway.


mScheduler

private GridGateway.SCHEDULER_TYPE mScheduler
The scheduler type with which it interfaces.


mJobType

private GridGateway.JOB_TYPE mJobType
The type of jobs that this grid gateway can accept.


mOS

private SysInfo.OS mOS
An optional os type for the grid gateway.


mArch

private SysInfo.Architecture mArch
An optional architecture type for the grid gateway.


mOSRelease

private String mOSRelease
Optional information about the os release.


mOSVersion

private String mOSVersion
Optional information about the version.


mGlibc

private String mGlibc
Optional information about the glibc.


mIdleNodes

private int mIdleNodes
The number of idle nodes.


mTotalNodes

private int mTotalNodes
The number of total nodes

Constructor Detail

GridGateway

public GridGateway()
The default constructor.


GridGateway

public GridGateway(GridGateway.TYPE type,
                   String contact,
                   GridGateway.SCHEDULER_TYPE scheduler)
The overloaded constructor.

Parameters:
type - the type of grid gateway.
contact - the contact string for it.
scheduler - the underlying scheduler that it talks to.
Method Detail

setJobType

public void setJobType(GridGateway.JOB_TYPE type)
Sets the type of jobs that run via this grid gateway.

Parameters:
type - the job type.

getJobType

public GridGateway.JOB_TYPE getJobType()
Returns the type of jobs that run via this grid gateway.

Returns:
the job type.

setType

public void setType(GridGateway.TYPE type)
Sets the type of grid gateway.

Parameters:
type - the gateway type.

getType

public GridGateway.TYPE getType()
Returns the type of jobs that run via this grid gateway.

Returns:
the type of grid gateway

setContact

public void setContact(String contact)
Sets the contact string for the Grid gateway

Parameters:
contact - the contact string

getContact

public String getContact()
Returns the contact string for the Grid gateway

Returns:
the contact string

setTotalNodes

public void setTotalNodes(String num)
Sets the number of total nodes that this grid gateway talks to.

Parameters:
num - the number of nodes.

setTotalNodes

public void setTotalNodes(int num)
Sets the total number of nodes that this grid gateway talks to.

Parameters:
num - the number of nodes.

getTotalNodes

public int getTotalNodes()
Returns the total number of nodes that this grid gateway talks to. If they are not set then -1 is returned.

Returns:
the number of nodes, or -1 if not set.

setIdleNodes

public void setIdleNodes(String num)
Sets the number of idle nodes that this grid gateway talks to.

Parameters:
num - the number of nodes.

setIdleNodes

public void setIdleNodes(int num)
Sets the number of idle nodes that this grid gateway talks to.

Parameters:
num - the number of nodes.

getIdleNodes

public int getIdleNodes()
Returns the total number of nodes that this grid gateway talks to. If they are not set then -1 is returned.

Returns:
the number of nodes, or -1 if not set.

setScheduler

public void setScheduler(String value)
Sets the the underlying scheduler that gateway talks to. In case the value does not match any of the predefined enumeration, the SCHEDULER_TYPE is set to Unknown.

Parameters:
value - the string value
See Also:
GridGateway.SCHEDULER_TYPE

setScheduler

public void setScheduler(GridGateway.SCHEDULER_TYPE scheduler)
Sets the the underlying scheduler that gateway talks to.

Parameters:
scheduler - the scheduler.

getScheduler

public GridGateway.SCHEDULER_TYPE getScheduler()
Returns the the underlying scheduler that gateway talks to.

Returns:
the scheduler.

setOS

public void setOS(SysInfo.OS os)
Sets the OS of the nodes that this grid gateway talks to.

Parameters:
os - the os

getOS

public SysInfo.OS getOS()
Returns the OS of the nodes that this grid gateway talks to.

Returns:
the os if set else null

setOSRelease

public void setOSRelease(String release)
Sets the OS release of the site.

Parameters:
release - the os releaseof the site.

getOSRelease

public String getOSRelease()
Returns the OS release of the site.

Returns:
the OS

setOSVersion

public void setOSVersion(String version)
Sets the OS version of the site.

Parameters:
version - the os versionof the site.

getOSVersion

public String getOSVersion()
Returns the OS version of the site.

Returns:
the OS

setGlibc

public void setGlibc(String version)
Sets the glibc version on the site.

Parameters:
version - the glibc version of the site.

getGlibc

public String getGlibc()
Returns the glibc version of the site.

Returns:
the OS

setArchitecture

public void setArchitecture(SysInfo.Architecture arch)
Sets the architecture of the nodes that this grid gateway talks to.

Parameters:
arch - the architecture of the nodes

getArchitecture

public SysInfo.Architecture getArchitecture()
Returns the architecture of the nodes that this grid gateway talks to.

Returns:
the architecture if set else null

toXML

public void toXML(Writer writer,
                  String indent)
           throws IOException
Writes out the xml description of the object.

Specified by:
toXML in class AbstractSiteData
Parameters:
writer - is a Writer opened and ready for writing. This can also be a StringWriter for efficient output.
indent - the indent to be used.
Throws:
IOException - if something fishy happens to the stream.

clone

public Object clone()
Returns the clone of the object.

Overrides:
clone in class AbstractSiteData
Returns:
the clone


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