Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / src / bindings / java / org / simgrid / msg / Comm.java
index c48a820..d73d042 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2022. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -14,7 +14,7 @@ public class Comm {
        protected boolean finished = false;
        /**
         * Represents the bind between the java comm and the
-        * native C comm. You must never access it, since it is 
+        * native C comm. You must never access it, since it is
         * automatically set.
         */
        private long bind = 0;
@@ -29,7 +29,11 @@ public class Comm {
        protected Comm() {
 
        }
-       /** Destroy the C communication object, when the GC reclaims the java part. */
+       /**
+        * Destroy the C communication object, when the GC reclaims the java part.
+        * @deprecated (from Java9 onwards)
+        */
+       @Deprecated @Override
        protected void finalize() throws Throwable{
                nativeFinalize();
        }
@@ -58,7 +62,7 @@ public class Comm {
                waitAll(comms, -1.);
        }
        /** Wait any of the communications, and return the rank of the terminating comm */
-       public static native void waitAny(Comm[] comms) throws TransferFailureException, HostFailureException, TimeoutException;
+       public static native int waitAny(Comm[] comms) throws TransferFailureException, HostFailureException, TimeoutException;
        /**
         * Returns the task associated with the communication.
         * if the communication isn't finished yet, will return null.
@@ -72,5 +76,5 @@ public class Comm {
        static {
                org.simgrid.NativeLib.nativeInit();
                nativeInit();
-       }       
+       }
 }