public class SysInfo
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
SysInfo.Architecture
Enumerates the new architecture types supported in Pegasus.
|
static class |
SysInfo.OS
Enumerates the new OS types supported in Pegasus.
|
Modifier and Type | Field and Description |
---|---|
static SysInfo.Architecture |
DEFAULT_ARCHITECTURE
The default Architecture the entry is associated with if none is specified
|
static SysInfo.OS |
DEFAULT_OS
The default OS the entry is associated with if none is specified
|
protected SysInfo.Architecture |
mArchitecture
The architecture.
|
protected java.lang.String |
mGlibc
The Glibc version.
|
protected SysInfo.OS |
mOS
The Operating System.
|
protected java.lang.String |
mOSRelease
The Operating System Release.
|
protected java.lang.String |
mOSVersion
The Operating System Version.
|
Constructor and Description |
---|
SysInfo()
The default constructor.
|
SysInfo(java.lang.String system)
This constructor takes the system information in the format arch::os:osversion:glibc
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns the clone of the object.
|
boolean |
equals(java.lang.Object obj)
Check if the system information matches.
|
SysInfo.Architecture |
getArchitecture()
Returns the architecture of the site.
|
java.lang.String |
getGlibc()
Returns the glibc version of the site.
|
SysInfo.OS |
getOS()
Returns the OS of the site.
|
java.lang.String |
getOSRelease()
Returns the OS release of the site.
|
java.lang.String |
getOSVersion()
Returns the OS version of the site.
|
private static boolean |
isValidArchitecture(java.lang.String arch)
Checks if the architecture is a valid supported architecture
|
private static boolean |
isValidOS(java.lang.String os)
Checks if the operating system is a valid supported operating system
|
void |
setArchitecture(SysInfo.Architecture arch)
Sets the architecture of the site.
|
void |
setGlibc(java.lang.String version)
Sets the glibc version on the site.
|
void |
setOS(SysInfo.OS os)
Sets the OS of the site.
|
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.
|
java.lang.String |
toString()
Returns the output of the data class as string.
|
public static final SysInfo.OS DEFAULT_OS
public static final SysInfo.Architecture DEFAULT_ARCHITECTURE
protected SysInfo.Architecture mArchitecture
protected SysInfo.OS mOS
protected java.lang.String mOSRelease
protected java.lang.String mOSVersion
protected java.lang.String mGlibc
public SysInfo()
public SysInfo(java.lang.String system)
system
- the system information stringprivate static boolean isValidArchitecture(java.lang.String arch)
arch
- architectureprivate static boolean isValidOS(java.lang.String os)
os
- operating systempublic void setArchitecture(SysInfo.Architecture arch)
arch
- the architecture.public SysInfo.Architecture getArchitecture()
public void setOS(SysInfo.OS os)
os
- the os of the site.public SysInfo.OS getOS()
public void setOSRelease(java.lang.String release)
release
- the os releaseof the site.public java.lang.String getOSRelease()
public void setOSVersion(java.lang.String version)
version
- the os versionof the site.public java.lang.String getOSVersion()
public void setGlibc(java.lang.String version)
version
- the glibc version of the site.public java.lang.String getGlibc()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- to be compared.public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object