Class GridGateway
- java.lang.Object
-
- edu.isi.pegasus.planner.catalog.site.classes.SiteData
-
- edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
-
- edu.isi.pegasus.planner.catalog.site.classes.GridGateway
-
- All Implemented Interfaces:
java.lang.Cloneable
public class GridGateway extends AbstractSiteData
This class describes the Grid Gateway into a site.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description 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
Fields Modifier and Type Field Description private SysInfo.Architecture
mArch
An optional architecture type for the grid gateway.private java.lang.String
mContact
The contact string for the grid gateway.private java.lang.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 java.lang.String
mOSRelease
Optional information about the os release.private java.lang.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 nodesprivate GridGateway.TYPE
mType
The grid type associated with this instance.
-
Constructor Summary
Constructors Constructor Description GridGateway()
The default constructor.GridGateway(GridGateway.TYPE type, java.lang.String contact, GridGateway.SCHEDULER_TYPE scheduler)
The overloaded constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(SiteDataVisitor visitor)
Accepts a Site Data Visitorjava.lang.Object
clone()
Returns the clone of the object.SysInfo.Architecture
getArchitecture()
Returns the architecture of the nodes that this grid gateway talks to.java.lang.String
getContact()
Returns the contact string for the Grid gatewayjava.lang.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.java.lang.String
getOSRelease()
Returns the OS release of the site.java.lang.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 this grid gateway.void
setArchitecture(SysInfo.Architecture arch)
Sets the architecture of the nodes that this grid gateway talks to.void
setContact(java.lang.String contact)
Sets the contact string for the Grid gatewayvoid
setGlibc(java.lang.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(java.lang.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(java.lang.String release)
Sets the OS release of the site.void
setOSVersion(java.lang.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(java.lang.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(java.lang.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(java.io.Writer writer, java.lang.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
-
-
-
-
Field Detail
-
mType
private GridGateway.TYPE mType
The grid type associated with this instance.
-
mContact
private java.lang.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 java.lang.String mOSRelease
Optional information about the os release.
-
mOSVersion
private java.lang.String mOSVersion
Optional information about the version.
-
mGlibc
private java.lang.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, java.lang.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 this grid gateway.- Returns:
- the type of grid gateway
-
setContact
public void setContact(java.lang.String contact)
Sets the contact string for the Grid gateway- Parameters:
contact
- the contact string
-
getContact
public java.lang.String getContact()
Returns the contact string for the Grid gateway- Returns:
- the contact string
-
setTotalNodes
public void setTotalNodes(java.lang.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(java.lang.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(java.lang.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(java.lang.String release)
Sets the OS release of the site.- Parameters:
release
- the os releaseof the site.
-
getOSRelease
public java.lang.String getOSRelease()
Returns the OS release of the site.- Returns:
- the OS
-
setOSVersion
public void setOSVersion(java.lang.String version)
Sets the OS version of the site.- Parameters:
version
- the os versionof the site.
-
getOSVersion
public java.lang.String getOSVersion()
Returns the OS version of the site.- Returns:
- the OS
-
setGlibc
public void setGlibc(java.lang.String version)
Sets the glibc version on the site.- Parameters:
version
- the glibc version of the site.
-
getGlibc
public java.lang.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(java.io.Writer writer, java.lang.String indent) throws java.io.IOException
Writes out the xml description of the object.- Specified by:
toXML
in classAbstractSiteData
- 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:
java.io.IOException
- if something fishy happens to the stream.
-
clone
public java.lang.Object clone()
Returns the clone of the object.- Overrides:
clone
in classAbstractSiteData
- Returns:
- the clone
-
accept
public void accept(SiteDataVisitor visitor) throws java.io.IOException
Accepts a Site Data Visitor- Specified by:
accept
in classAbstractSiteData
- Parameters:
visitor
-- Throws:
java.io.IOException
- if something fishy happens to the stream.
-
-