public void setIgnoreRate(String ignoreRate) { if (!ignoreRate.equalsIgnoreCase("true") && !ignoreRate.equalsIgnoreCase("false")) throw new RuntimeException("Incorrect value for ignore-rate"); if (mCMFake != null && mCID == null) { mCMFake.setIgnoreRate(Boolean.parseBoolean(ignoreRate)); } else if (mCMFake == null && mCID != null) { mCID.setIgnoreRate(Boolean.parseBoolean(ignoreRate)); } else throw new RuntimeException("No element initialized for ignore rate : " + ignoreRate); }
public void endModule() { if (mCMFake == null) throw new RuntimeException("A module clause is ending without" + "initialization."); Module mReal; if (mModuleModel.getModuleMap().get(mCMFake.getName()) != null) { mReal = mModuleModel.getModuleMap().get(mCMFake.getName()); } else mReal = new Module(mCMFake); // partitionIds are equal to 1 or 2 in the current module model. We decrease the Id by one, in // order // to properly assign the values for the partition Ids to the array of values in the modules. mReal.setExecutionCost(mCMFake.getExecutionCost(), mCMFake.getPartitionId() - 1); mReal.setExecutionCount(mCMFake.getExecutionCount(), mCMFake.getPartitionId() - 1); mReal.setPartitionId(-1); mModuleModel.getModuleMap().put(mReal.getName(), mReal); mList.add(mCMFake); mCMFake = null; }
public void setModuleExecCost(String execCost) { if (mCMFake == null) throw new RuntimeException("No module for exec cost: " + execCost); mCMFake.setExecutionCost(Double.parseDouble(execCost)); }
public void setModuleExecCount(String execCount) { if (mCMFake == null) throw new RuntimeException("No module for exec count: " + execCount); mCMFake.setExecutionCount(Long.parseLong(execCount)); }
public void setModulePartition(String partitionId) { if (mCMFake == null) throw new RuntimeException("No module to assign the partition" + "for Id: " + partitionId); mCMFake.setPartitionId(Integer.parseInt(partitionId)); }