com.friendshipsystems.fsshresourcemanager.config
Class FHost
java.lang.Object
com.friendshipsystems.fsshresourcemanager.utils.FDBObject
com.friendshipsystems.fsshresourcemanager.config.FHost
public class FHost
- extends com.friendshipsystems.fsshresourcemanager.utils.FDBObject
This class represents the configured hosts.
- Author:
- FRIENDSHIP SYSTEMS
|
Constructor Summary |
FHost()
|
FHost(java.lang.String name,
int port,
int numberOfCPUs,
int mbMemory,
FOperatingSystem os,
java.lang.String tempDir,
java.lang.String sftpRoot,
java.lang.Boolean isActive,
java.lang.Boolean supportsX)
|
| Methods inherited from class com.friendshipsystems.fsshresourcemanager.utils.FDBObject |
delete |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
FHost
public FHost()
FHost
public FHost(java.lang.String name,
int port,
int numberOfCPUs,
int mbMemory,
FOperatingSystem os,
java.lang.String tempDir,
java.lang.String sftpRoot,
java.lang.Boolean isActive,
java.lang.Boolean supportsX)
getHosts
public static java.util.List<FHost> getHosts()
getHost
public static FHost getHost(java.lang.String name)
getHost
public static FHost getHost(int id)
getHostsByOs
public static java.util.List<FHost> getHostsByOs(FOperatingSystem os)
getPotentialHosts
public static java.util.List<FHost> getPotentialHosts()
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
save
public java.lang.Boolean save()
- Overrides:
save in class com.friendshipsystems.fsshresourcemanager.utils.FDBObject
update
public java.lang.Boolean update()
- Overrides:
update in class com.friendshipsystems.fsshresourcemanager.utils.FDBObject
hasAuth
public java.lang.Boolean hasAuth()
toMap
public java.util.Map<java.lang.String,java.lang.Object> toMap()
- Specified by:
toMap in class com.friendshipsystems.fsshresourcemanager.utils.FDBObject
getId
public int getId()
- Returns:
- the id
setHostName
public void setHostName(java.lang.String hostName)
- Parameters:
hostName - the hostName to set
getHostName
public java.lang.String getHostName()
- Returns:
- the hostName
setNumberOfProcessors
public void setNumberOfProcessors(int numberOfProcessors)
- Parameters:
numberOfProcessors - the numberOfProcessors to set
getNumberOfProcessors
public int getNumberOfProcessors()
- Returns:
- the numberOfProcessors
setMbMemory
public void setMbMemory(int mbMemory)
- Parameters:
mbMemory - the mbMemory to set
getMbMemory
public int getMbMemory()
- Returns:
- the mbMemory
setOs
public void setOs(FOperatingSystem os)
- Parameters:
os - the FOperatingSystem to set
getOs
public FOperatingSystem getOs()
- Returns:
- the osId
setIsActive
public void setIsActive(java.lang.Boolean isActive)
- Parameters:
isActive - the isActive to set
getIsActive
public java.lang.Boolean getIsActive()
- Returns:
- the isActive
setSupportsX
public void setSupportsX(java.lang.Boolean supportsX)
- Parameters:
supportsX - the supportsX to set
getSupportsX
public java.lang.Boolean getSupportsX()
- Returns:
- the supportsX
getApplications
public java.util.Set<FApplication> getApplications()
- Returns:
- the applications
addApplication
public void addApplication(FApplication app)
- Parameters:
app -
removeApplication
public void removeApplication(FApplication app)
- Parameters:
app -
setTempDir
public void setTempDir(java.lang.String tempDir)
- Parameters:
tempDir - the tempDir to set
getTempDir
public java.lang.String getTempDir()
- Returns:
- the tempDir
setSftpRoot
public void setSftpRoot(java.lang.String sftpRoot)
- Parameters:
sftpRoot - the sftpRoot to set
getSftpRoot
public java.lang.String getSftpRoot()
- Returns:
- the sftpRoot
useProcessor
public java.lang.Boolean useProcessor()
useProcessors
public java.lang.Boolean useProcessors(int cpus)
freeProcessor
public void freeProcessor()
freeProcessors
public void freeProcessors(int cpus)
setNumberOfUsedProcessors
public void setNumberOfUsedProcessors(int numberOfUsedProcessors)
- Parameters:
numberOfUsedProcessors - the numberOfUsedProcessors to set
getNumberOfUsedProcessors
public int getNumberOfUsedProcessors()
- Returns:
- the numberOfUsedProcessors
getNumberOfFreeProcessors
public int getNumberOfFreeProcessors()
setKnownHost
public void setKnownHost(java.lang.Boolean knownHost)
- Parameters:
knownHost - the knownHost to set
getKnownHost
public java.lang.Boolean getKnownHost()
- Returns:
- the knownHost
setPassword
public void setPassword(java.lang.String password)
- Parameters:
password - the password to set
getPassword
public java.lang.String getPassword()
- Returns:
- the password
setUserName
public void setUserName(java.lang.String userName)
- Parameters:
userName - the userName to set
getUserName
public java.lang.String getUserName()
- Returns:
- the userName
setPort
public void setPort(int port)
- Parameters:
port - the port to set
getPort
public int getPort()
- Returns:
- the port
setNumberOfLockedProcessors
public void setNumberOfLockedProcessors(int mNumberOfLockedProcessors)
getNumberOfLockedProcessors
public int getNumberOfLockedProcessors()
cloneAppsFrom
public boolean cloneAppsFrom(FHost from)
setPortX
public void setPortX(java.lang.String xPort)
- Parameters:
xPort - the xPort to set
getPortX
public java.lang.String getPortX()
- Returns:
- the xPort
getXPort
public int getXPort(int index)