Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add the files generated by javasphinx in the git
[simgrid.git] / docs / source / java / org / simgrid / msg / VM.rst
1 class org.simgrid.msg.VM
2 ========================
3
4 .. java:package:: org.simgrid.msg
5    :noindex:
6
7 .. java:type:: public class VM extends Host
8
9 Constructors
10 ------------
11 VM
12 ^^
13
14 .. java:constructor:: public VM(Host host, String name)
15    :outertype: VM
16
17    Create a `basic` VM : 1 core and 1GB of RAM.
18
19    :param host: Host node
20    :param name: name of the machine
21
22 VM
23 ^^
24
25 .. java:constructor:: public VM(Host host, String name, int coreAmount)
26    :outertype: VM
27
28    Create a VM without useless values (for humans)
29
30    :param host: Host node
31    :param name: name of the machine
32    :param coreAmount: the amount of cores of the VM
33
34 VM
35 ^^
36
37 .. java:constructor:: public VM(Host host, String name, int ramSize, int migNetSpeed, int dpIntensity)
38    :outertype: VM
39
40    Create a VM with 1 core
41
42    :param host: Host node
43    :param name: name of the machine
44    :param ramSize: size of the RAM that should be allocated (in MBytes)
45    :param migNetSpeed: (network bandwidth allocated for migrations in MB/s, if you don't know put zero ;))
46    :param dpIntensity: (dirty page percentage according to migNetSpeed, [0-100], if you don't know put zero ;))
47
48 VM
49 ^^
50
51 .. java:constructor:: public VM(Host host, String name, int coreAmount, int ramSize, int migNetSpeed, int dpIntensity)
52    :outertype: VM
53
54    Create a VM
55
56    :param host: Host node
57    :param name: name of the machine
58    :param coreAmount: the amount of cores of the VM
59    :param ramSize: size of the RAM that should be allocated (in MBytes)
60    :param migNetSpeed: (network bandwidth allocated for migrations in MB/s, if you don't know put zero ;))
61    :param dpIntensity: (dirty page percentage according to migNetSpeed, [0-100], if you don't know put zero ;))
62
63 Methods
64 -------
65 all
66 ^^^
67
68 .. java:method:: public static native VM[] all()
69    :outertype: VM
70
71    Retrieve the list of all existing VMs
72
73 destroy
74 ^^^^^^^
75
76 .. java:method:: public native void destroy()
77    :outertype: VM
78
79    Shutdown and unref the VM.
80
81 finalize
82 ^^^^^^^^
83
84 .. java:method:: @Deprecated @Override protected void finalize() throws Throwable
85    :outertype: VM
86
87    Make sure that the GC also destroys the C object
88
89 getCoreAmount
90 ^^^^^^^^^^^^^
91
92 .. java:method:: public int getCoreAmount()
93    :outertype: VM
94
95    Returns the amount of virtual CPUs provided
96
97 getVMByName
98 ^^^^^^^^^^^
99
100 .. java:method:: public static native VM getVMByName(String name)
101    :outertype: VM
102
103    Retrieve a VM from its name
104
105 isCreated
106 ^^^^^^^^^
107
108 .. java:method:: public native int isCreated()
109    :outertype: VM
110
111    Returns whether the given VM is currently suspended
112
113 isMigrating
114 ^^^^^^^^^^^
115
116 .. java:method:: public native int isMigrating()
117    :outertype: VM
118
119    Returns whether the given VM is currently running
120
121 isRunning
122 ^^^^^^^^^
123
124 .. java:method:: public native int isRunning()
125    :outertype: VM
126
127    Returns whether the given VM is currently running
128
129 isSuspended
130 ^^^^^^^^^^^
131
132 .. java:method:: public native int isSuspended()
133    :outertype: VM
134
135    Returns whether the given VM is currently suspended
136
137 migrate
138 ^^^^^^^
139
140 .. java:method:: public void migrate(Host destination) throws HostFailureException
141    :outertype: VM
142
143    Change the host on which all processes are running (pre-copy is implemented)
144
145 resume
146 ^^^^^^
147
148 .. java:method:: public native void resume()
149    :outertype: VM
150
151    Immediately resumes the execution of all processes within the given VM No resume cost occurs. If you want to simulate this too, you want to use a @ref File.read() before or after, depending on the exact semantic of VM resume to you.
152
153 setBound
154 ^^^^^^^^
155
156 .. java:method:: public native void setBound(double bound)
157    :outertype: VM
158
159    Set a CPU bound for a given VM.
160
161    :param bound: in flops/s
162
163 shutdown
164 ^^^^^^^^
165
166 .. java:method:: public native void shutdown()
167    :outertype: VM
168
169    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()
170
171 start
172 ^^^^^
173
174 .. java:method:: public native void start()
175    :outertype: VM
176
177    start the VM
178
179 suspend
180 ^^^^^^^
181
182 .. java:method:: public native void suspend()
183    :outertype: VM
184
185    Immediately suspend the execution of all processes within the given VM No suspension cost occurs. If you want to simulate this too, you want to use a @ref File.write() before or after, depending on the exact semantic of VM suspend to you.
186