Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
not all resources need a property set, only Host, Link and Storage
[simgrid.git] / src / bindings / java / org / simgrid / surf / Link.java
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.12
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8
9 package org.simgrid.surf;
10
11 public class Link extends Resource {
12   private long swigCPtr;
13
14   protected Link(long cPtr, boolean cMemoryOwn) {
15     super(SurfJNI.Link_SWIGUpcast(cPtr), cMemoryOwn);
16     swigCPtr = cPtr;
17   }
18
19   protected static long getCPtr(Link obj) {
20     return (obj == null) ? 0 : obj.swigCPtr;
21   }
22
23   protected void finalize() {
24     delete();
25   }
26
27   public synchronized void delete() {
28     if (swigCPtr != 0) {
29       if (swigCMemOwn) {
30         swigCMemOwn = false;
31         SurfJNI.delete_Link(swigCPtr);
32       }
33       swigCPtr = 0;
34     }
35     super.delete();
36   }
37
38   protected static long[] cArrayUnwrap(Link[] arrayWrapper) {
39       long[] cArray = new long[arrayWrapper.length];
40       for (int i=0; i<arrayWrapper.length; i++)
41         cArray[i] = Link.getCPtr(arrayWrapper[i]);
42       return cArray;
43   }
44
45   protected static Link[] cArrayWrap(long[] cArray, boolean cMemoryOwn) {
46     Link[] arrayWrapper = new Link[cArray.length];
47     for (int i=0; i<cArray.length; i++)
48       arrayWrapper[i] = new Link(cArray[i], cMemoryOwn);
49     return arrayWrapper;
50   }
51
52   public double getBandwidth() {
53     return SurfJNI.Link_getBandwidth(swigCPtr, this);
54   }
55
56   public void updateBandwidth(double value, double date) {
57     SurfJNI.Link_updateBandwidth__SWIG_0(swigCPtr, this, value, date);
58   }
59
60   public void updateBandwidth(double value) {
61     SurfJNI.Link_updateBandwidth__SWIG_1(swigCPtr, this, value);
62   }
63
64   public double getLatency() {
65     return SurfJNI.Link_getLatency(swigCPtr, this);
66   }
67
68   public void updateLatency(double value, double date) {
69     SurfJNI.Link_updateLatency__SWIG_0(swigCPtr, this, value, date);
70   }
71
72   public void updateLatency(double value) {
73     SurfJNI.Link_updateLatency__SWIG_1(swigCPtr, this, value);
74   }
75
76   public XbtDict getProperties() {
77     long cPtr = SurfJNI.Link_getProperties(swigCPtr, this);
78     return (cPtr == 0) ? null : new XbtDict(cPtr, false);
79   }
80
81 }