Class SysInfo
- java.lang.Object
-
- edu.isi.pegasus.planner.catalog.classes.SysInfo
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SysInfo extends java.lang.Object implements java.lang.CloneableA container class to keep system information associated with a Site entry in the Site Catalog or a Transformation in the Transformation Catalog. The class follows the NMI conventions for specifying Architecture/ OS and OS release.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSysInfo.ArchitectureEnumerates the new architecture types supported in Pegasus.static classSysInfo.OSEnumerates the new OS types supported in Pegasus.
-
Field Summary
Fields Modifier and Type Field Description static SysInfo.ArchitectureDEFAULT_ARCHITECTUREThe default Architecture the entry is associated with if none is specifiedstatic SysInfo.OSDEFAULT_OSThe default OS the entry is associated with if none is specifiedprotected SysInfo.ArchitecturemArchitectureThe architecture.protected java.lang.StringmGlibcThe Glibc version.protected SysInfo.OSmOSThe Operating System.protected java.lang.StringmOSReleaseThe Operating System Release.protected java.lang.StringmOSVersionThe Operating System Version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Returns the clone of the object.booleanequals(java.lang.Object obj)Check if the system information matches.SysInfo.ArchitecturegetArchitecture()Returns the architecture of the site.java.lang.StringgetGlibc()Returns the glibc version of the site.SysInfo.OSgetOS()Returns the OS of the site.java.lang.StringgetOSRelease()Returns the OS release of the site.java.lang.StringgetOSVersion()Returns the OS version of the site.private static booleanisValidArchitecture(java.lang.String arch)Checks if the architecture is a valid supported architectureprivate static booleanisValidOS(java.lang.String os)Checks if the operating system is a valid supported operating systemvoidsetArchitecture(SysInfo.Architecture arch)Sets the architecture of the site.voidsetGlibc(java.lang.String version)Sets the glibc version on the site.voidsetOS(SysInfo.OS os)Sets the OS of the site.voidsetOSRelease(java.lang.String release)Sets the OS release of the site.voidsetOSVersion(java.lang.String version)Sets the OS version of the site.java.lang.StringtoString()Returns the output of the data class as string.
-
-
-
Field Detail
-
DEFAULT_OS
public static final SysInfo.OS DEFAULT_OS
The default OS the entry is associated with if none is specified
-
DEFAULT_ARCHITECTURE
public static final SysInfo.Architecture DEFAULT_ARCHITECTURE
The default Architecture the entry is associated with if none is specified
-
mArchitecture
protected SysInfo.Architecture mArchitecture
The architecture.
-
mOS
protected SysInfo.OS mOS
The Operating System.
-
mOSRelease
protected java.lang.String mOSRelease
The Operating System Release. Optional.
-
mOSVersion
protected java.lang.String mOSVersion
The Operating System Version. Optional.
-
mGlibc
protected java.lang.String mGlibc
The Glibc version. Optional.
-
-
Method Detail
-
isValidArchitecture
private static boolean isValidArchitecture(java.lang.String arch)
Checks if the architecture is a valid supported architecture- Parameters:
arch- architecture- Returns:
- true if it is a valid supported architecture, false otherwise
-
isValidOS
private static boolean isValidOS(java.lang.String os)
Checks if the operating system is a valid supported operating system- Parameters:
os- operating system- Returns:
- true if it is a valid supported operating system, false otherwise
-
setArchitecture
public void setArchitecture(SysInfo.Architecture arch)
Sets the architecture of the site.- Parameters:
arch- the architecture.
-
getArchitecture
public SysInfo.Architecture getArchitecture()
Returns the architecture of the site.- Returns:
- the architecture.
-
setOS
public void setOS(SysInfo.OS os)
Sets the OS of the site.- Parameters:
os- the os of the site.
-
getOS
public SysInfo.OS getOS()
Returns the OS of the site.- Returns:
- the OS
-
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
-
equals
public boolean equals(java.lang.Object obj)
Check if the system information matches.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- to be compared.- Returns:
- boolean
-
clone
public java.lang.Object clone()
Returns the clone of the object.- Overrides:
clonein classjava.lang.Object- Returns:
- the clone
-
toString
public java.lang.String toString()
Returns the output of the data class as string.- Overrides:
toStringin classjava.lang.Object- Returns:
- String
-
-