Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines with new year.
[simgrid.git] / src / bindings / java / org / simgrid / trace / Trace.java
index cb9c618..0a2ce31 100644 (file)
@@ -1,6 +1,6 @@
 /* JNI interface to C code for the TRACES part of SimGrid. */
 
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2020. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -16,19 +16,23 @@ public final class Trace {
     NativeLib.nativeInit();
   }
 
-  // TODO complete the binding of the tracing API 
+  private Trace() {
+    throw new IllegalStateException("Utility class \"Trace\"");
+  }
+
+  // TODO complete the binding of the tracing API
 
   /**
-   * Declare a new user variable associated to hosts with a color. 
-   *  
+   * Declare a new user variable associated to hosts with a color.
+   *
    * @param variable
    * @param color
    */
   public static final native void hostVariableDeclareWithColor (String variable, String color);
 
   /**
-   *  Add a value to a variable of a host. 
-   *  
+   *  Add a value to a variable of a host.
+   *
    * @param host
    * @param variable
    * @param value
@@ -36,8 +40,8 @@ public final class Trace {
   public static final native void hostVariableAdd (String host, String variable, double value);
 
   /**
-   * Subtract a value from a variable of a host. 
-   *  
+   * Subtract a value from a variable of a host.
+   *
    * @param host
    * @param variable
    * @param value
@@ -45,8 +49,8 @@ public final class Trace {
   public static final native void hostVariableSub (String host, String variable, double value);
 
   /**
-   * Set the value of a variable of a host at a given timestamp. 
-   * 
+   * Set the value of a variable of a host at a given timestamp.
+   *
    * @param time
    * @param host
    * @param variable
@@ -55,8 +59,8 @@ public final class Trace {
   public static final native void hostVariableSetWithTime (double time, String host, String variable, double value);
 
   /**
-   *   Add a value to a variable of a host at a given timestamp. 
-   * 
+   *   Add a value to a variable of a host at a given timestamp.
+   *
    * @param time
    * @param host
    * @param variable
@@ -65,8 +69,8 @@ public final class Trace {
   public static final native void hostVariableAddWithTime (double time, String host, String variable, double value);
 
   /**
-   * Subtract a value from a variable of a host at a given timestamp.  
-   * 
+   * Subtract a value from a variable of a host at a given timestamp.
+   *
    * @param time
    * @param host
    * @param variable
@@ -75,28 +79,28 @@ public final class Trace {
   public static final native void hostVariableSubWithTime (double time, String host, String variable, double value);
 
   /**
-   *  Get declared user host variables. 
-   * 
+   *  Get declared user host variables.
+   *
    */
   public static final native String[]  getHostVariablesName ();
 
   /**
-   *  Declare a new user variable associated to links. 
-   *  
+   *  Declare a new user variable associated to links.
+   *
    * @param variable
    */
   public static final native void linkVariableDeclare (String variable);
 
   /**
-   * Declare a new user variable associated to links with a color. 
+   * Declare a new user variable associated to links with a color.
    * @param variable
    * @param color
    */
   public static final native void linkVariableDeclareWithColor (String variable, String color);
 
   /**
-   *  Set the value of a variable of a link. 
-   *   
+   *  Set the value of a variable of a link.
+   *
    * @param link
    * @param variable
    * @param value
@@ -104,8 +108,8 @@ public final class Trace {
   public static final native void linkVariableSet (String link, String variable, double value);
 
   /**
-   * Add a value to a variable of a link. 
-   * 
+   * Add a value to a variable of a link.
+   *
    * @param link
    * @param variable
    * @param value
@@ -113,8 +117,8 @@ public final class Trace {
   public static final native void linkVariableAdd (String link, String variable, double value);
 
   /**
-   * Subtract a value from a variable of a link. 
-   * 
+   * Subtract a value from a variable of a link.
+   *
    * @param link
    * @param variable
    * @param value
@@ -122,8 +126,8 @@ public final class Trace {
   public static final native void linkVariableSub (String link, String variable, double value);
 
   /**
-   *  Set the value of a variable of a link at a given timestamp. 
-   *  
+   *  Set the value of a variable of a link at a given timestamp.
+   *
    * @param time
    * @param link
    * @param variable
@@ -133,7 +137,7 @@ public final class Trace {
 
   /**
    * Add a value to a variable of a link at a given timestamp.
-   * 
+   *
    * @param time
    * @param link
    * @param variable
@@ -142,8 +146,8 @@ public final class Trace {
   public static final native void linkVariableAddWithTime (double time, String link, String variable, double value);
 
   /**
-   * Subtract a value from a variable of a link at a given timestamp. 
-   *   
+   * Subtract a value from a variable of a link at a given timestamp.
+   *
    * @param time
    * @param link
    * @param variable
@@ -152,8 +156,8 @@ public final class Trace {
   public static final native void linkVariableSubWithTime (double time, String link, String variable, double value);
 
   /**
-   * Set the value of the variable present in the links connecting source and destination. 
-   * 
+   * Set the value of the variable present in the links connecting source and destination.
+   *
    * @param src
    * @param dst
    * @param variable
@@ -162,8 +166,8 @@ public final class Trace {
   public static final native void linkSrcDstVariableSet (String src, String dst, String variable, double value);
 
   /**
-   * Add a value to the variable present in the links connecting source and destination. 
-   *  
+   * Add a value to the variable present in the links connecting source and destination.
+   *
    * @param src
    * @param dst
    * @param variable
@@ -172,8 +176,8 @@ public final class Trace {
   public static final native void linkSrcDstVariableAdd (String src, String dst, String variable, double value);
 
   /**
-   * Subtract a value from the variable present in the links connecting source and destination. 
-   *   
+   * Subtract a value from the variable present in the links connecting source and destination.
+   *
    * @param src
    * @param dst
    * @param variable
@@ -182,8 +186,8 @@ public final class Trace {
   public static final native void linkSrcDstVariableSub (String src, String dst, String variable, double value);
 
   /**
-   *  Set the value of the variable present in the links connecting source and destination at a given timestamp. 
-   *   
+   *  Set the value of the variable present in the links connecting source and destination at a given timestamp.
+   *
    * @param time
    * @param src
    * @param dst
@@ -193,8 +197,8 @@ public final class Trace {
   public static final native void linkSrcDstVariableSetWithTime (double time, String src, String dst, String variable, double value);
 
   /**
-   * Add a value to the variable present in the links connecting source and destination at a given timestamp. 
-   * 
+   * Add a value to the variable present in the links connecting source and destination at a given timestamp.
+   *
    * @param time
    * @param src
    * @param dst
@@ -204,8 +208,8 @@ public final class Trace {
   public static final native void linkSrcdstVariableAddWithTime (double time, String src, String dst, String variable, double value);
 
   /**
-   * Subtract a value from the variable present in the links connecting source and destination at a given timestamp. 
-   *  
+   * Subtract a value from the variable present in the links connecting source and destination at a given timestamp.
+   *
    * @param time
    * @param src
    * @param dst
@@ -215,29 +219,29 @@ public final class Trace {
   public static final native void linkSrcDstVariableSubWithTime (double time, String src, String dst, String variable, double value);
 
   /**
-   *  Get declared user link variables.  
+   *  Get declared user link variables.
    */
   public static final native String[] getLinkVariablesName ();
 
 
-  /* **** ******** WARNINGS ************** ***** */  
+  /* **** ******** WARNINGS ************** ***** */
   /* Only the following routines have been       */
   /* JNI implemented - Adrien May, 22nd          */
-  /* **** ******************************** ***** */  
+  /* **** ******************************** ***** */
 
   /**
-   * Declare a user state that will be associated to hosts. 
+   * Declare a user state that will be associated to hosts.
    * A user host state can be used to trace application states.
-   * 
+   *
    * @param name The name of the new state to be declared.
    */
   public static final native void hostStateDeclare(String name);
 
   /**
    * Declare a new value for a user state associated to hosts.
-   * The color needs to be a string with three numbers separated by spaces in the range [0,1]. 
-   * A light-gray color can be specified using "0.7 0.7 0.7" as color. 
-   * 
+   * The color needs to be a string with three numbers separated by spaces in the range [0,1].
+   * A light-gray color can be specified using "0.7 0.7 0.7" as color.
+   *
    * @param state The name of the new state to be declared.
    * @param value The name of the value
    * @param color The color of the value
@@ -247,7 +251,7 @@ public final class Trace {
   /**
    *   Set the user state to the given value.
    *  (the queue is totally flushed and reinitialized with the given state).
-   *  
+   *
    * @param host The name of the host to be considered.
    * @param state The name of the state previously declared.
    * @param value The new value of the state.
@@ -255,8 +259,8 @@ public final class Trace {
   public static final native void hostSetState (String host, String state, String value);
 
   /**
-   * Push a new value for a state of a given host. 
-   * 
+   * Push a new value for a state of a given host.
+   *
    * @param host The name of the host to be considered.
    * @param state The name of the state previously declared.
    * @param value The value to be pushed.
@@ -264,23 +268,23 @@ public final class Trace {
   public static final native void hostPushState (String host, String state, String value);
 
   /**
-   *  Pop the last value of a state of a given host. 
-   *   
+   *  Pop the last value of a state of a given host.
+   *
    * @param host The name of the host to be considered.
    * @param state The name of the state to be popped.
    */
   public static final native void hostPopState (String host, String state);
 
   /**
-   * Declare a new user variable associated to hosts. 
-   * 
+   * Declare a new user variable associated to hosts.
+   *
    * @param variable
    */
   public static final native void hostVariableDeclare (String variable);
 
   /**
-   * Set the value of a variable of a host. 
-   * 
+   * Set the value of a variable of a host.
+   *
    * @param host
    * @param variable
    * @param value
@@ -288,15 +292,15 @@ public final class Trace {
   public static final native void hostVariableSet (String host, String variable, double value);
 
   /**
-   * Declare a new user variable associated to VMs. 
-   * 
+   * Declare a new user variable associated to VMs.
+   *
    * @param variable
    */
   public static final native void vmVariableDeclare (String variable);
 
   /**
-   * Set the value of a variable of a VM. 
-   * 
+   * Set the value of a variable of a VM.
+   *
    * @param vm
    * @param variable
    * @param value