Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 19 Dec 2016 18:00:02 +0000 (19:00 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 19 Dec 2016 23:11:07 +0000 (00:11 +0100)
14 files changed:
src/bindings/java/org/simgrid/msg/Comm.java
src/bindings/java/org/simgrid/msg/HostFailureException.java
src/bindings/java/org/simgrid/msg/HostNotFoundException.java
src/bindings/java/org/simgrid/msg/JniException.java
src/bindings/java/org/simgrid/msg/MsgException.java
src/bindings/java/org/simgrid/msg/NativeException.java
src/bindings/java/org/simgrid/msg/ProcessKilledError.java
src/bindings/java/org/simgrid/msg/ProcessNotFoundException.java
src/bindings/java/org/simgrid/msg/StorageNotFoundException.java
src/bindings/java/org/simgrid/msg/Task.java
src/bindings/java/org/simgrid/msg/TaskCancelledException.java
src/bindings/java/org/simgrid/msg/TimeoutException.java
src/bindings/java/org/simgrid/msg/TransferFailureException.java
src/bindings/java/org/simgrid/msg/VM.java

index 2ea34c3..c48a820 100644 (file)
@@ -6,10 +6,7 @@
 
 package org.simgrid.msg;
 
 
 package org.simgrid.msg;
 
-/**
- * Communication action, representing an ongoing communication
- * between processes.
- */
+/** Communication action, representing an ongoing communication between processes. */
 public class Comm {
        /** Indicates if the communication is a receiving communication */
        protected boolean receiving;
 public class Comm {
        /** Indicates if the communication is a receiving communication */
        protected boolean receiving;
index 7070131..edb471b 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2014. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
index 79ef54c..13d6993 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
index 322ffde..741e35e 100644 (file)
@@ -1,7 +1,6 @@
 /* This exception is raised when there is a problem within the bindings (in JNI). */
 
 /* This exception is raised when there is a problem within the bindings (in JNI). */
 
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -9,7 +8,8 @@
 package org.simgrid.msg;
 
 /**
 package org.simgrid.msg;
 
 /**
- * This exception is raised when there is a problem within the bindings (in JNI). 
+ * Exception raised when there is a problem within the bindings (in JNI).
+ *  
  * That's a RuntimeException: I guess nobody wants to survive a JNI error in SimGrid
  */
 public class JniException extends RuntimeException {
  * That's a RuntimeException: I guess nobody wants to survive a JNI error in SimGrid
  */
 public class JniException extends RuntimeException {
index e683264..c93ace1 100644 (file)
@@ -1,7 +1,6 @@
 /* This exception is an abstract class grouping all MSG-related exceptions */
 
 /* This exception is an abstract class grouping all MSG-related exceptions */
 
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
index 73b2523..ecc12de 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.simgrid.msg;
 
 
 package org.simgrid.msg;
 
-/** This exception is raised when there is an error within the C world of SimGrid. */
+/** Exception raised when there is an error within the C world of SimGrid. */
 public class NativeException extends MsgException {
        private static final long serialVersionUID = 1L;
 
 public class NativeException extends MsgException {
        private static final long serialVersionUID = 1L;
 
index 023e5cf..91769db 100644 (file)
@@ -1,13 +1,11 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
-/** This error class is only used to interrupt the java user code 
- * when the process gets killed by an external event.
+/** Used internally to interrupt the user code when the process gets killed.
  * Don't catch it.
  */
 
  * Don't catch it.
  */
 
index 6f90ce6..7bdd892 100644 (file)
@@ -1,31 +1,19 @@
-/* This exception is raised when looking for a non-existing process. */
-
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team.  All rights reserved.         */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
-/**
- * This exception is raised when looking for a non-existing process.
- */
+/** Exception raised when looking for a non-existing process. */
 public class ProcessNotFoundException extends MsgException {
        private static final long serialVersionUID = 1L;
 
 public class ProcessNotFoundException extends MsgException {
        private static final long serialVersionUID = 1L;
 
-       /**
-        * Constructs an <code>ProcessNotFoundException</code> without a 
-        * detail message. 
-        */
+       /** Constructs an <code>ProcessNotFoundException</code> without a detail message. */ 
        public ProcessNotFoundException() {
                super();
        }
        public ProcessNotFoundException() {
                super();
        }
-       /**
-        * Constructs an <code>ProcessNotFoundException</code> with a detail message. 
-        *
-        * @param   s   the detail message.
-        */
+       /** Constructs an <code>ProcessNotFoundException</code> with a detail message. */
        public ProcessNotFoundException(String s) {
                super(s);
        }
        public ProcessNotFoundException(String s) {
                super(s);
        }
index 5f8e6d5..839b733 100644 (file)
@@ -1,16 +1,11 @@
-/* This exception is raised when looking for a non-existing storage. */
-
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
-/**
- * This exception is raised when looking for a non-existing storage.
- */
+/** Exception raised when looking for a non-existing storage. */
 public class StorageNotFoundException extends MsgException {
        private static final long serialVersionUID = 1L;
 
 public class StorageNotFoundException extends MsgException {
        private static final long serialVersionUID = 1L;
 
@@ -18,11 +13,7 @@ public class StorageNotFoundException extends MsgException {
        public StorageNotFoundException() {
                super();
        }
        public StorageNotFoundException() {
                super();
        }
-       /**
-        * Constructs an <code>StorageNotFoundException</code> with a detail message. 
-        *
-        * @param   s   the detail message.
-        */
+       /** Constructs an <code>StorageNotFoundException</code> with a detail message. */
        public StorageNotFoundException(String s) {
                super(s);
        }
        public StorageNotFoundException(String s) {
                super(s);
        }
index 26dc2b0..e267422 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
index 950899d..d63f7a1 100644 (file)
@@ -1,16 +1,11 @@
-/* This exception is raised when looking for a non-existing host. */
-
-/* Copyright (c) 2006-2007, 2010, 2013-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
-/**
- * This exception is raised when task is cancelled.
- */
+/** Exception raised when a task is cancelled. */
 public class TaskCancelledException extends MsgException {
        private static final long serialVersionUID = 1L;
 
 public class TaskCancelledException extends MsgException {
        private static final long serialVersionUID = 1L;
 
@@ -18,11 +13,7 @@ public class TaskCancelledException extends MsgException {
        public TaskCancelledException() {
                super();
        }
        public TaskCancelledException() {
                super();
        }
-       /**
-        * Constructs an <code>TaskCancelledException</code> with a detail message. 
-        *
-        * @param   s   the detail message.
-        */
+       /** Constructs an <code>TaskCancelledException</code> with a detail message. */
        public TaskCancelledException(String s) {
                super(s);
        }
        public TaskCancelledException(String s) {
                super(s);
        }
index 1600fae..d4a3ed0 100644 (file)
@@ -1,16 +1,11 @@
-/* This exception is raised when looking for a non-existing host. */
-
-/* Copyright (c) 2006-2007, 2010, 2013-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
-/**
- * This exception is raised when time's out while sending tasks.
- */
+/** Exception raised when sending a task timeouts */
 public class TimeoutException extends MsgException {
        private static final long serialVersionUID = 1L;
 
 public class TimeoutException extends MsgException {
        private static final long serialVersionUID = 1L;
 
@@ -18,11 +13,7 @@ public class TimeoutException extends MsgException {
        public TimeoutException() {
                super();
        }
        public TimeoutException() {
                super();
        }
-       /**
-        * Constructs an <code>TransferFailureException</code> with a detail message. 
-        *
-        * @param   s   the detail message.
-        */
+       /** Constructs an <code>TransferFailureException</code> with a detail message. */
        public TimeoutException(String s) {
                super(s);
        }
        public TimeoutException(String s) {
                super(s);
        }
index 9ba2df9..1bc952a 100644 (file)
@@ -1,16 +1,11 @@
-/* This exception is raised when looking for a non-existing host. */
-
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2014. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
 
-/**
- * This exception is raised if transfer failed while sending tasks.
- */
+/** Exception raised if sending a task fails */
 public class TransferFailureException extends MsgException {
        private static final long serialVersionUID = 1L;
 
 public class TransferFailureException extends MsgException {
        private static final long serialVersionUID = 1L;
 
index d3893a4..a393c95 100644 (file)
@@ -1,7 +1,6 @@
 /* JNI interface to virtual machine in Simgrid */
 
 /* JNI interface to virtual machine in Simgrid */
 
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2014. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -9,28 +8,22 @@
 package org.simgrid.msg;
 import java.util.ArrayList;
 
 package org.simgrid.msg;
 import java.util.ArrayList;
 
-public class VM extends Host{
-       // Please note that we are not declaring a new bind variable 
-       //(the bind variable has been inherited from the super class Host)
+public class VM extends Host {
+       // No need to declare a new bind variable: we use the one inherited from the super class Host
 
        /* Static functions */ 
 
        /* Static functions */ 
-       // GetByName is inherited from the super class Host
-
 
        private static ArrayList<VM> vms= new ArrayList<>();
        private Host currentHost; 
 
 
        private static ArrayList<VM> vms= new ArrayList<>();
        private Host currentHost; 
 
-       /* Constructors / destructors */
-       /**
-        * Create a `basic' VM (i.e. 1GB of RAM, other values are not taken into account).
-        */
+       /** Create a `basic' VM (i.e. 1GB of RAM, other values are not taken into account). */
        public VM(Host host, String name) {
                this(host,name,1024, 0, 0);
        }
 
        /**
        public VM(Host host, String name) {
                this(host,name,1024, 0, 0);
        }
 
        /**
-        * Create a  VM
-        * @param host  Host node
+        * Create a VM
+        * @param host Host node
         * @param name name of the machine
         * @param ramSize size of the RAM that should be allocated (in MBytes)
         * @param migNetSpeed (network bandwith allocated for migrations in MB/s, if you don't know put zero ;))
         * @param name name of the machine
         * @param ramSize size of the RAM that should be allocated (in MBytes)
         * @param migNetSpeed (network bandwith allocated for migrations in MB/s, if you don't know put zero ;))
@@ -38,7 +31,7 @@ public class VM extends Host{
         */
        public VM(Host host, String name, int ramSize, int migNetSpeed, int dpIntensity){
                super();
         */
        public VM(Host host, String name, int ramSize, int migNetSpeed, int dpIntensity){
                super();
-               super.name = name; 
+               super.name = name;
                this.currentHost = host; 
                create(host, name, ramSize, migNetSpeed, dpIntensity);
                vms.add(this);
                this.currentHost = host; 
                create(host, name, ramSize, migNetSpeed, dpIntensity);
                vms.add(this);
@@ -66,34 +59,25 @@ public class VM extends Host{
 
        /* JNI / Native code */
 
 
        /* JNI / Native code */
 
-       /* get/set property methods are inherited from the Host class. */
-
-       /** Returns whether the given VM is currently suspended
-        */     
+       /** Returns whether the given VM is currently suspended */      
        public native int isCreated();
 
        public native int isCreated();
 
-       /** Returns whether the given VM is currently running
-        */
+       /** Returns whether the given VM is currently running */
        public native int isRunning();
 
        public native int isRunning();
 
-       /** Returns whether the given VM is currently running
-        */
+       /** Returns whether the given VM is currently running */
        public native int isMigrating();
 
        public native int isMigrating();
 
-       /** Returns whether the given VM is currently suspended
-        */     
+       /** Returns whether the given VM is currently suspended */      
        public native int isSuspended();
 
        public native int isSuspended();
 
-       /** Returns whether the given VM is currently saving
-        */
+       /** Returns whether the given VM is currently saving */
        public native int isSaving();
 
        public native int isSaving();
 
-       /** Returns whether the given VM is currently saved
-        */
+       /** Returns whether the given VM is currently saved */
        public native int isSaved();
 
        public native int isSaved();
 
-       /** Returns whether the given VM is currently restoring its state
-        */
+       /** Returns whether the given VM is currently restoring its state */
        public native boolean isRestoring();
 
        /**
        public native boolean isRestoring();
 
        /**
@@ -111,21 +95,18 @@ public class VM extends Host{
         */
        public native void setBound(double bound);
 
         */
        public native void setBound(double bound);
 
-       /**
-        * start the VM
-        */
+       /**  start the VM */
        public native void start();
 
 
        /**
        public native void start();
 
 
        /**
-        * Immediately kills all processes within the given VM. Any memory that they allocated will be leaked.
-        * No extra delay occurs. If you want to simulate this too, you want to use a MSG_process_sleep() or something
+        * Immediately kills all processes within the given VM. 
+        * 
+        * No extra delay occurs. If you want to simulate this too, you want to use a MSG_process_sleep()
         */
        public native void shutdown();
 
         */
        public native void shutdown();
 
-       /**  
-        * Invoke native migration routine
-        */
+       /** Invoke native migration routine */
        public native void internalmig(Host destination) throws Exception; // TODO add throws DoubleMigrationException (i.e. when you call migrate on a VM that is already migrating);
 
 
        public native void internalmig(Host destination) throws Exception; // TODO add throws DoubleMigrationException (i.e. when you call migrate on a VM that is already migrating);
 
 
@@ -179,10 +160,7 @@ public class VM extends Host{
         */
        public native void restore();
 
         */
        public native void restore();
 
-
-       /**
-        * Class initializer, to initialize various JNI stuff
-        */
+       /**  Class initializer (for JNI), don't do it yourself */
        public static native void nativeInit();
        static {
                nativeInit();
        public static native void nativeInit();
        static {
                nativeInit();