appl.parallel
Class SimpleResourceProperties
java.lang.Object
appl.parallel.SimpleResourceProperties
- All Implemented Interfaces:
- ComputingResourceProperties, Serializable
- Direct Known Subclasses:
- XuluServerProperties
public class SimpleResourceProperties
- extends Object
- implements ComputingResourceProperties, Serializable
Sets the following properties:
Maximum Java Memory
Free Java Memory
System Information
System Architecture
System Version
Hostname
IP
- Author:
- Dominik Appl
- See Also:
ComputingResourceProperties
,
Serialized Form
properties
protected Properties properties
SimpleResourceProperties
public SimpleResourceProperties()
getProperties
public Properties getProperties()
- Specified by:
getProperties
in interface ComputingResourceProperties
getUsedMemory
protected long getUsedMemory()
getFormatedMemoryString
protected String getFormatedMemoryString(long bytes)
getProperty
public String getProperty(String key)
- Specified by:
getProperty
in interface ComputingResourceProperties
- Parameters:
key
- the key
- Returns:
- the property property associated with that key or null if not found
setProperty
public void setProperty(String key,
String value)
- Description copied from interface:
ComputingResourceProperties
- Sets a property
- Specified by:
setProperty
in interface ComputingResourceProperties
- Parameters:
key
- the keyvalue
- the value
toString
public String toString()
- Overrides:
toString
in class Object
getName
public String getName()
- Specified by:
getName
in interface ComputingResourceProperties
- Returns:
- the name of the resource (usually the hostname)
isAvailable
public boolean isAvailable()
- Specified by:
isAvailable
in interface ComputingResourceProperties
- Returns:
- says if the resource is available for computation (of in use).
getIP
public String getIP()
- Specified by:
getIP
in interface ComputingResourceProperties
- Returns:
- the ip of the resource
getPort
public String getPort()
- Specified by:
getPort
in interface ComputingResourceProperties
- Returns:
- port the resouce is bound to