From: Martin Quinson Date: Sun, 5 Apr 2015 13:53:18 +0000 (+0200) Subject: Rename Task.setDataSize() to Task.setBytesAmount() X-Git-Tag: v3_12~738^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6caaa39a8e0a2346f10d3a8012cd82c7466dceef Rename Task.setDataSize() to Task.setBytesAmount() --- diff --git a/ChangeLog b/ChangeLog index 4a7be35299..dc3e85d4e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ SimGrid (3.12) NOT RELEASED; urgency=low * Interface improvement: - Rename Host.isAvail() to Host.isOn() - Rename Process.currentProcess() to Process.getCurrentProcess() + - Rename Task.setDataSize() to Task.setBytesAmount() - Merge Task.getRemainingDuration() and Task.getComputeDuration() into Task.getFlopsAmount() SIMIX: diff --git a/src/bindings/java/jmsg_task.c b/src/bindings/java/jmsg_task.c index 319a5e17de..850a999a2c 100644 --- a/src/bindings/java/jmsg_task.c +++ b/src/bindings/java/jmsg_task.c @@ -333,7 +333,7 @@ Java_org_simgrid_msg_Task_setPriority(JNIEnv * env, MSG_task_set_priority(task, (double) priority); } JNIEXPORT void JNICALL -Java_org_simgrid_msg_Task_setComputeDuration +Java_org_simgrid_msg_Task_setFlopsAmount (JNIEnv *env, jobject jtask, jdouble computationAmount) { msg_task_t task = jtask_to_native_task(jtask, env); @@ -344,7 +344,7 @@ Java_org_simgrid_msg_Task_setComputeDuration MSG_task_set_flops_amount(task, (double) computationAmount); } JNIEXPORT void JNICALL -Java_org_simgrid_msg_Task_setDataSize +Java_org_simgrid_msg_Task_setBytesAmount (JNIEnv *env, jobject jtask, jdouble dataSize) { msg_task_t task = jtask_to_native_task(jtask, env); diff --git a/src/bindings/java/jmsg_task.h b/src/bindings/java/jmsg_task.h index b7c7036163..77daa9fbd0 100644 --- a/src/bindings/java/jmsg_task.h +++ b/src/bindings/java/jmsg_task.h @@ -163,7 +163,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setPriority * Signature (D)V */ JNIEXPORT void JNICALL -Java_org_simgrid_msg_Task_setComputeDuration +Java_org_simgrid_msg_Task_setFlopsAmount (JNIEnv *env, jobject jtask, jdouble computationAmount); /** @@ -172,7 +172,7 @@ Java_org_simgrid_msg_Task_setComputeDuration * Signature (D)V */ JNIEXPORT void JNICALL -Java_org_simgrid_msg_Task_setDataSize +Java_org_simgrid_msg_Task_setBytesAmount (JNIEnv *env, jobject jtask, jdouble dataSize); /** diff --git a/src/bindings/java/org/simgrid/msg/Task.java b/src/bindings/java/org/simgrid/msg/Task.java index 994d2306bf..c76e911deb 100644 --- a/src/bindings/java/org/simgrid/msg/Task.java +++ b/src/bindings/java/org/simgrid/msg/Task.java @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2014. The SimGrid Team. +/* Copyright (c) 2006-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -108,20 +108,15 @@ public class Task { /* * * * * * Getters / Setters * * * * * */ - /** - * Gets the name of a task - */ + /** Gets the name of a task */ public String getName() { return name; } - /** - * Gets the sender of the task - * Returns null if the task hasn't been sent yet - */ + + /** Gets the sender of the task (or null if not sent yet) */ public native Process getSender(); - /** Gets the source of the task. - * Returns null if the task hasn't been sent yet. - */ + + /** Gets the source of the task (or null if not sent yet). */ public native Host getSource(); /** Gets the remaining amount of flops to execute in this task @@ -131,7 +126,7 @@ public class Task { public native double getFlopsAmount(); /** * Sets the name of the task - * @param name the new task name.c + * @param name the new task name */ public native void setName(String name); /** @@ -143,37 +138,37 @@ public class Task { * @param priority The new priority of the task. */ public native void setPriority(double priority); - /** - * Set the computation amount needed to process the task - * @param computationAmount the amount of computation needed to process the task + + /** Set the computation amount needed to process the task + * + * Warning if the execution is already started and ongoing, this call does nothing. + * @param flopsAmount the amount of computation needed to process the task */ - public native void setComputeDuration(double computationAmount); + public native void setFlopsAmount(double flopsAmount); /** - * Set the data size of the task - * @param dataSize the size of the task + * Set the amount of bytes to exchange the task + * + * Warning if the communication is already started and ongoing, this call does nothing. + * @param bytesAmount the size of the task */ - public native void setDataSize(double dataSize); + public native void setBytesAmount(double bytesAmount); /* * * * * * Computation-related * * * * * */ /** - * Executes a task on the location on which the process is running. - * + * Executes a task on the location on which the current process is running. * * @throws HostFailureException * @throws TaskCancelledException */ public native void execute() throws HostFailureException,TaskCancelledException; - /** - * Bound a computation to a certain load - * - */ + + /** Bound a computation to a certain load */ public native void setBound(double load); - /** - * Cancels a task. - * - */ + + /** Cancels a task. */ public native void cancel(); + /** Deletes a task. * * @exception NativeException if the destruction failed.