}
}
private void populateSystemConf(final Ini conf) {
final Section sysConf = conf.get("system");
Set<String> configKeySet = sysConf.keySet();
Set<String> validKeySet = this.getFieldSet();
this.checkConfigKeys(configKeySet, validKeySet);
this.brokerId = this.getInt(sysConf, "brokerId");
this.serverPort = this.getInt(sysConf, "serverPort", 8123);
this.dashboardHttpPort = this.getInt(sysConf, "dashboardHttpPort", 8120);
if (!StringUtils.isBlank(sysConf.get("dataPath"))) {
this.setDataPath(sysConf.get("dataPath"));
}
if (!StringUtils.isBlank(sysConf.get("appClassPath"))) {
this.appClassPath = sysConf.get("appClassPath");
}
if (!StringUtils.isBlank(sysConf.get("dataLogPath"))) {
this.dataLogPath = sysConf.get("dataLogPath");
}
if (!StringUtils.isBlank(sysConf.get("hostName"))) {
this.hostName = sysConf.get("hostName");
}
this.numPartitions = this.getInt(sysConf, "numPartitions");
this.unflushThreshold = this.getInt(sysConf, "unflushThreshold");
this.unflushInterval = this.getInt(sysConf, "unflushInterval");
this.maxSegmentSize = this.getInt(sysConf, "maxSegmentSize");
this.maxTransferSize = this.getInt(sysConf, "maxTransferSize");
if (!StringUtils.isBlank(sysConf.get("getProcessThreadCount"))) {
this.getProcessThreadCount = this.getInt(sysConf, "getProcessThreadCount");
}
if (!StringUtils.isBlank(sysConf.get("putProcessThreadCount"))) {
this.putProcessThreadCount = this.getInt(sysConf, "putProcessThreadCount");
}
if (!StringUtils.isBlank(sysConf.get("deletePolicy"))) {
this.deletePolicy = sysConf.get("deletePolicy");
}
if (!StringUtils.isBlank(sysConf.get("deleteWhen"))) {
this.deleteWhen = sysConf.get("deleteWhen");
}
if (!StringUtils.isBlank(sysConf.get("quartzThreadCount"))) {
this.quartzThreadCount = this.getInt(sysConf, "quartzThreadCount");
}
if (!StringUtils.isBlank(sysConf.get("maxCheckpoints"))) {
this.maxCheckpoints = this.getInt(sysConf, "maxCheckpoints");
}
if (!StringUtils.isBlank(sysConf.get("checkpointInterval"))) {
this.checkpointInterval = this.getLong(sysConf, "checkpointInterval");
}
if (!StringUtils.isBlank(sysConf.get("maxTxTimeoutTimerCapacity"))) {
this.maxTxTimeoutTimerCapacity = this.getInt(sysConf, "maxTxTimeoutTimerCapacity");
}
if (!StringUtils.isBlank(sysConf.get("flushTxLogAtCommit"))) {
this.flushTxLogAtCommit = this.getInt(sysConf, "flushTxLogAtCommit");
}
if (!StringUtils.isBlank(sysConf.get("maxTxTimeoutInSeconds"))) {
this.maxTxTimeoutInSeconds = this.getInt(sysConf, "maxTxTimeoutInSeconds");
}
// added by dennis,2012-05-19
if (!StringUtils.isBlank(sysConf.get("acceptSubscribe"))) {
this.acceptSubscribe = this.getBoolean(sysConf, "acceptSubscribe");
}
if (!StringUtils.isBlank(sysConf.get("acceptPublish"))) {
this.acceptPublish = this.getBoolean(sysConf, "acceptPublish");
}
// added by dennis,2012-06-21
if (!StringUtils.isBlank(sysConf.get("stat"))) {
this.stat = this.getBoolean(sysConf, "stat");
}
if (!StringUtils.isBlank(sysConf.get("updateConsumerOffsets"))) {
this.updateConsumerOffsets = this.getBoolean(sysConf, "updateConsumerOffsets");
}
if (!StringUtils.isBlank(sysConf.get("loadMessageStoresInParallel"))) {
this.loadMessageStoresInParallel = this.getBoolean(sysConf, "loadMessageStoresInParallel");
}
}