-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVmInfo.java
67 lines (47 loc) · 1.71 KB
/
VmInfo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package org.cloudbus.cloudsim.examples;
import java.util.List;
import org.cloudbus.cloudsim.Vm;
public class VmInfo {
/** The VM unique id. */
public int id;
/** The user id. */
public int userId;
/** A Unique Identifier (UID) for the VM, that is compounded by the user id and VM id. */
public String uid;
/** The size the VM image size (the amount of storage it will use, at least initially). */
public long size;
/** The MIPS capacity of each VM's PE. */
public double mips;
/** The number of PEs required by the VM. */
public int numberOfPes;
/** The required ram. */
public int ram;
/** The required bw. */
public long bw;
/** The Virtual Machine Monitor (VMM) that manages the VM. */
public String vmm;
/** Indicates if the VM is in migration process. */
public boolean inMigration;
/** The current allocated storage size. */
public long currentAllocatedSize;
/** The current allocated ram. */
public int currentAllocatedRam;
/** The current allocated bw. */
public long currentAllocatedBw;
/** The current allocated mips for each VM's PE. */
public List<Double> currentAllocatedMips;
public VmInfo(Vm cloudsimVm) {
this.id = cloudsimVm.getId();
this.uid = cloudsimVm.getUid();
this.mips = cloudsimVm.getMips();
this.numberOfPes = cloudsimVm.getNumberOfPes();
this.ram = cloudsimVm.getRam();
this.bw = cloudsimVm.getBw();
this.vmm = cloudsimVm.getVmm();
this.inMigration = cloudsimVm.isInMigration();
this.currentAllocatedSize = cloudsimVm.getCurrentAllocatedSize();
this.currentAllocatedRam = cloudsimVm.getCurrentAllocatedRam();
this.currentAllocatedBw = cloudsimVm.getCurrentAllocatedBw();
this.currentAllocatedMips = cloudsimVm.getCurrentAllocatedMips();
}
}