* it and/or modify it under the terms of the license
*(GNU LGPL) which comes with this package.
*/
-
+
package simgrid.msg;
class ParallelTask {
-
+
/**
* This attribute represents a bind between a java task object and
* a native task. Even if this attribute is public you must never
* access to it. It is set automaticatly during the build of the object.
*/
- public long bind = 0;
-
-
- /* Default constructor (disabled) */
- protected ParallelTask() {};
-
+ public long bind = 0;
+
+
+ /* Default constructor (disabled) */
+ protected ParallelTask() {
+ };
+
/**
* Construct an new parallel task with the specified processing amount and amount for each host
* implied.
* InvalidComputeDuration if the parameter computeDurations is null.
* InvalidMessageSize if the parameter messageSizes is null.
*/
- public ParallelTask(String name, Host[] hosts,double[] computeDurations, double[] messageSizes)
- throws JniException {
- create(name,hosts,computeDurations,messageSizes);
- }
-
+ public ParallelTask(String name, Host[]hosts, double[]computeDurations,
+ double[]messageSizes)
+ throws JniException {
+ create(name, hosts, computeDurations, messageSizes);
+ }
/**
* This method creates a parallel task (if not already created).
*
* InvalidComputeDuration if the parameter computeDurations is null.
* InvalidMessageSize if the parameter messageSizes is null.
*/
- public void create(String name, Host[] hosts,double[] computeDurations, double[] messageSizes)
- throws JniException {
-
- if(bind != 0)
- Msg.parallelTaskCreate(this,name,hosts,computeDurations,messageSizes);
- }
-
+ public void create(String name, Host[]hosts, double[]computeDurations,
+ double[]messageSizes)
+ throws JniException {
+
+ if (bind != 0)
+ Msg.parallelTaskCreate(this, name, hosts, computeDurations,
+ messageSizes);
+ }
/**
* This method gets the sender of the parallel task.
*
* @exception InvalidTaskException is the specified parallel task is not valid. A parallel task
* is invalid if it is not binded with a native parallel task.
*
- */
- Process getSender() throws JniException {
- return Msg.parallelTaskGetSender(this);
- }
-
+ */ Process getSender() throws JniException {
+ return Msg.parallelTaskGetSender(this);
+ }
/**
* This method gets the source of the parallel task.
*
*
* @exception InvalidTaskException is the specified parallel task is not valid. A task
* is invalid if it is not binded with a native parallel task.
- */
- public Host getSource() throws JniException {
- return Msg.parallelTaskGetSource(this);
- }
-
+ */ public Host getSource() throws JniException {
+ return Msg.parallelTaskGetSource(this);
+ }
/**
* This method gets the name of a parallel task.
*
*
* @exception InvalidTaskException is the specified parallel task is not valid. A parallel task
* is invalid if it is not binded with a native parallel task.
- */
- public String getName() throws JniException {
- return Msg.parallelTaskGetName(this);
- }
-
+ */ public String getName() throws JniException {
+ return Msg.parallelTaskGetName(this);
+ }
/**
* This method cancels a task.
*
* @exception InvalidTaskException is the specified parallel task is not valid. A parallel task
* is invalid if it is not binded with a native parallel task.
* MsgException if the cancelation failed.
- */
- public void cancel() throws JniException, NativeException {
- Msg.parallelTaskCancel(this);
- }
-
+ */ public void cancel() throws JniException, NativeException {
+ Msg.parallelTaskCancel(this);
+ }
/**
* This method gets the computing amount of the parallel task.
*
*
* @exception InvalidTaskException is the specified task is not valid. A task
* is invalid if it is not binded with a native task.
- */
- public double getComputeDuration() throws JniException {
- return Msg.parallelTaskGetComputeDuration(this);
- }
-
+ */ public double getComputeDuration() throws JniException {
+ return Msg.parallelTaskGetComputeDuration(this);
+ }
/**
* This method gets the remaining computation.
*
*
* @exception InvalidTaskException is the specified parallel task is not valid. A parallel task
* is invalid if it is not binded with a native parallel task.
- */
- public double getRemainingDuration() throws JniException {
- return Msg.parallelTaskGetRemainingDuration(this);
- }
-
+ */ public double getRemainingDuration() throws JniException {
+ return Msg.parallelTaskGetRemainingDuration(this);
+ }
/**
* This method sets the priority of the computation of the parallel task.
* The priority doesn't affect the transfert rate. For example a
*
* @exception InvalidTaskException is the specified task is not valid. A task
* is invalid if it is not binded with a native task.
- */
- public void setPrirority(double priority) throws JniException {
- Msg.parallelTaskSetPriority(this,priority);
- }
-
+ */ public void setPrirority(double priority) throws JniException {
+ Msg.parallelTaskSetPriority(this, priority);
+ }
/**
* This method destroies a parallel task.
*
* @exception InvalidTaskException is the specified task is not valid. A parallel task
* is invalid if it is not binded with a native task.
* MsgException if the destruction failed.
- */
- public void destroy() throws JniException, NativeException {
- Msg.parallelTaskDestroy(this);
- }
-
+ */ public void destroy() throws JniException, NativeException {
+ Msg.parallelTaskDestroy(this);
+ }
/**
* This method deletes a parallel task.
*
* @exception InvalidTaskException is the specified parallel task is not valid. A parallel task
* is invalid if it is not binded with a native parallel task.
* MsgException if the destruction failed.
- */
- protected void finalize() throws JniException, NativeException {
- if(this.bind != 0)
- Msg.parallelTaskDestroy(this);
- }
-
+ */ protected void finalize() throws JniException, NativeException {
+ if (this.bind != 0)
+ Msg.parallelTaskDestroy(this);
+ }
/**
* This method execute a task on the location on which the
* process is running.
* @exception InvalidTaskException is the specified parallel task is not valid. A parallel task
* is invalid if it is not binded with a native parallel task.
* MsgException if the destruction failed.
- */
- public void execute() throws JniException, NativeException {
- Msg.parallelTaskExecute(this);
- }
-}
+ */ public void execute() throws JniException, NativeException {
+ Msg.parallelTaskExecute(this);
+}}