Public Member Functions | |
String | getName () |
void | setData (Object data) |
Object | getData () |
boolean | hasData () |
int | getLoad () |
double | getSpeed () |
boolean | isAvail () |
Static Public Member Functions | |
static Host | getByName (String name) throws HostNotFoundException |
static int | getCount () |
static Host | currentHost () |
static Host[] | all () |
Data Fields | |
long | bind |
A host object represents a location (any possible place) where a process may run. Thus it is represented as a physical resource with computing capabilities, some mailboxes to enable running process to communicate with remote ones, and some private data that can be only accessed by local process. An instance of this class is always binded with the corresponding native host. All the native hosts are automatically created during the call of the method Msg.createEnvironment(). This method take as parameter a platform file which describes all elements of the platform (host, link, root..). You cannot create a host yourself.
The best way to get an host instance is to call the static method Host.getByName().
For example to get the instance of the host. If your platform file description contains an host named "Jacquelin" :
Host jacquelin; try { jacquelin = Host.getByName("Jacquelin"); } catch(HostNotFoundException e) { System.err.println(e.toString()); } ...
static Host simgrid::msg::Host::getByName | ( | String | name | ) | throws HostNotFoundException [inline, static] |
This static method gets an host instance associated with a native host of your platform. This is the best way to get a java host object.
name | The name of the host to get. |
HostNotFoundException | if the name of the host is not valid. NativeException if the native version of this method failed. |
static int simgrid::msg::Host::getCount | ( | ) | [inline, static] |
This static method returns the count of the installed hosts.
static Host simgrid::msg::Host::currentHost | ( | ) | [inline, static] |
This static method return an instance to the host of the current process.
static Host [] simgrid::msg::Host::all | ( | ) | [inline, static] |
This static method returns all of the hosts of the installed platform.
String simgrid::msg::Host::getName | ( | ) | [inline] |
This method returns the name of a host.
void simgrid::msg::Host::setData | ( | Object | data | ) | [inline] |
Sets the data of the host.
Object simgrid::msg::Host::getData | ( | ) | [inline] |
Gets the data of the host.
boolean simgrid::msg::Host::hasData | ( | ) | [inline] |
Checks whether a host has data.
int simgrid::msg::Host::getLoad | ( | ) | [inline] |
This method returns the number of tasks currently running on a host. The external load is not taken in account.
double simgrid::msg::Host::getSpeed | ( | ) | [inline] |
This method returns the speed of the processor of a host, regardless of the current load of the machine.
boolean simgrid::msg::Host::isAvail | ( | ) | [inline] |
This method tests if a host is avail.
This attribute represents a bind between a java host object and a native host. Even if this attribute is public you must never access to it. It is set automatically during the call of the static method Host.getByName().
Back to the main Simgrid Documentation page |
Generated for SimGridAPI by
![]() |