* User data.
*/
private Object data;
- protected Host() {
+ /**
+ *
+ */
+ protected Host() {
this.bind = 0;
this.data = null;
};
*
* @param name The name of the host to get.
*
- * @exception HostNotFoundException if the name of the host is not valid.
+ * @return
+ * @exception HostNotFoundException if the name of the host is not valid.
* NativeException if the native version of this method failed.
*/
public static Host getByName(String name)
throws HostNotFoundException {
+ Process.ifInterruptedStop();
if (name==null)
throw new NullPointerException("No host can have a null name");
return MsgNative.hostGetByName(name);
*
*/
public static int getCount() {
+ Process.ifInterruptedStop();
return MsgNative.hostGetCount();
}
* @return The host on which the current process is executed.
*/
public static Host currentHost() {
+ Process.ifInterruptedStop();
return MsgNative.hostSelf();
}
*
*/
public static Host[] all() {
+ Process.ifInterruptedStop();
return MsgNative.allHosts();
}
*
*/
public String getName() {
+ Process.ifInterruptedStop();
return MsgNative.hostGetName(this);
}
/**
* Sets the data of the host.
*
- */
+ *
+ * @param data
+ */
public void setData(Object data) {
+ Process.ifInterruptedStop();
this.data = data;
}
/**
* Gets the data of the host.
- */
+ *
+ * @return
+ */
public Object getData() {
+ Process.ifInterruptedStop();
return this.data;
}
/**
* Checks whether a host has data.
- */
+ *
+ * @return
+ */
public boolean hasData() {
+ Process.ifInterruptedStop();
return null != this.data;
}
* @return The number of tasks currently running on a host.
*/
public int getLoad() {
+ Process.ifInterruptedStop();
return MsgNative.hostGetLoad(this);
}
*
*/
public double getSpeed() {
+ Process.ifInterruptedStop();
return MsgNative.hostGetSpeed(this);
}
- /** This method tests if a host is avail. */
+ /** This method tests if a host is avail.
+ * @return
+ */
public boolean isAvail() {
+ Process.ifInterruptedStop();
return MsgNative.hostIsAvail(this);
}
}