Change tabbing for everything....
[IRC.git] / Robust / src / Analysis / Scheduling / TransTaskSimulator.java
1 package Analysis.Scheduling;
2
3 import java.util.Queue;
4
5 public class TransTaskSimulator extends TaskSimulator {
6   private int targetCoreNum;
7   private Queue<ObjectInfo> newObjs;
8
9   public TransTaskSimulator(CoreSimulator cs, int targetCoreNum, Queue<ObjectInfo> nobjs) {
10     super(null, cs);
11     this.targetCoreNum = targetCoreNum;
12     this.newObjs = nobjs;
13   }
14
15   public void process() {
16     if(this.currentRun == null) {
17       this.currentRun = new ExeResult();
18     }
19
20     this.currentRun.finishTime = 1 * sizeof(this.newObjs.peek().obj.getCd());
21   }
22
23   public ObjectInfo refreshTask() {
24     return this.newObjs.poll();
25   }
26
27   private int sizeof(Object obj) {
28     return 1;
29   }
30
31   public boolean isFinished() {
32     return this.newObjs.isEmpty();
33   }
34
35   public int getTargetCoreNum() {
36     return targetCoreNum;
37   }
38 }