public class NewTag {
private static final int BASE = 0;
public static final int VM_FAIL=1;
}
public class NewCenter extends Datacenter {
………….;
……….;
public void processEvent(SimEvent ev) {
int srcId = -1;
switch (ev.getTag()) {
……;
…….
case NewTag.VM_FAIL: // New event
processVmFail(ev); //Implemented event method
default:
processOtherEvent(ev);
break;
}
}
protected void processVmFail(SimEvent ev)
{
/// implement the event action
}
}