com.friendshipsystems.fsshresourcemanager.config
Class FApplicationInfo
java.lang.Object
com.friendshipsystems.fsshresourcemanager.utils.FDBObject
com.friendshipsystems.fsshresourcemanager.config.FApplicationInfo
- All Implemented Interfaces:
- java.io.Serializable
public class FApplicationInfo
- extends com.friendshipsystems.fsshresourcemanager.utils.FDBObject
- implements java.io.Serializable
This class represents the relationship between an application and a host.
- Author:
- FRIENDSHIP SYSTEMS
- See Also:
- Serialized Form
| Methods inherited from class com.friendshipsystems.fsshresourcemanager.utils.FDBObject |
delete, save, update |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
FApplicationInfo
public FApplicationInfo()
getHostToApplicationMappings
public static java.util.List<FApplicationInfo> getHostToApplicationMappings()
getHostToApplicationMappingsByHost
public static java.util.List<FApplicationInfo> getHostToApplicationMappingsByHost(FHost host)
getHostToApplicationMappingsByApp
public static java.util.List<FApplicationInfo> getHostToApplicationMappingsByApp(FApplication app)
getApplicationInfo
public static FApplicationInfo getApplicationInfo(FHost host,
FApplication app)
toMap
public java.util.Map<java.lang.String,java.lang.Object> toMap()
- Specified by:
toMap in class com.friendshipsystems.fsshresourcemanager.utils.FDBObject
setPath
public void setPath(java.lang.String path)
- Parameters:
path - the path to set
getPath
public java.lang.String getPath()
- Returns:
- the path
setNumberOfHardLics
public void setNumberOfHardLics(java.lang.Integer numberOfHardLics)
- Parameters:
numberOfHardLics - the numberOfHardLics to set
getNumberOfHardLics
public int getNumberOfHardLics()
- Returns:
- the numberOfHardLics
setPriority
public void setPriority(java.lang.Integer priority)
- Parameters:
priority - the priority to set
getPriority
public int getPriority()
- Returns:
- the priority
setHost
public void setHost(FHost host)
- Parameters:
host - the FHost to set
getHost
public FHost getHost()
- Returns:
- the hostId
setApp
public void setApp(FApplication app)
- Parameters:
app - the FApplication to set
getApp
public FApplication getApp()
- Returns:
- the appId
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
start
public java.lang.Boolean start()
stop
public java.lang.Boolean stop()
canRunOnHardLics
public java.lang.Boolean canRunOnHardLics()
- Determines whether there are enough free hard lics on this host to run the app
- Returns:
- true if there are enough, false otherwise
setNumberOfUsedHardLics
public void setNumberOfUsedHardLics(java.lang.Integer numberOfUsedHardLics)
- Parameters:
numberOfUsedHardLics - the numberOfUsedHardLics to set
getNumberOfFreeHardLics
public java.lang.Integer getNumberOfFreeHardLics()
- Returns:
- the numberOfFreeHardLics
getNumberOfUsedHardLics
public java.lang.Integer getNumberOfUsedHardLics()
- Returns:
- the numberOfUsedHardLics
useHardLics
public void useHardLics(int amount)
- Use hard lics
- Parameters:
amount - The number of hard lics to use
freeHardLics
public void freeHardLics(int amount)
- Free hard lics
- Parameters:
amount - The number of hard lics to free