From da70ff117ba0c3c2b7c12f3cf80c8608b1d635cc Mon Sep 17 00:00:00 2001 From: coderfengyun Date: Sat, 19 Jul 2014 10:02:11 +0800 Subject: [PATCH] refactor refactor --- .../bench4q/master/domain/factory/PluginDomainFactory.java | 3 --- .../highavailable/impl/HighAvailablePoolImpl.java | 7 +++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/PluginDomainFactory.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/PluginDomainFactory.java index 7322dabf..6107bdba 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/PluginDomainFactory.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/PluginDomainFactory.java @@ -62,7 +62,6 @@ public class PluginDomainFactory { private PluginInfoModel createPluginInfoModel(PluginInfo pluginInfo) { PluginInfoModel pluginInfoModel = new PluginInfoModel(); pluginInfoModel.setName(pluginInfo.getName()); - pluginInfoModel.setNameCN(pluginInfo.getNameCN()); pluginInfoModel.setParamInfoModels(createParamInfoModels(pluginInfo .getParams())); pluginInfoModel @@ -82,7 +81,6 @@ public class PluginDomainFactory { private BehaviorInfoModel createBehaviorInfoModel(BehaviorInfo behaviorInfo) { BehaviorInfoModel behaviorInfoModel = new BehaviorInfoModel(); behaviorInfoModel.setName(behaviorInfo.getName()); - behaviorInfoModel.setNameCN(behaviorInfo.getNameCN()); behaviorInfoModel.setParamInfoModels(createParamInfoModels(behaviorInfo .getParams())); behaviorInfoModel.setGroupModels(createGroupModels(behaviorInfo @@ -143,7 +141,6 @@ public class PluginDomainFactory { } GroupModel groupModel = new GroupModel(); groupModel.setName(group.getName()); - groupModel.setNameCN(group.getNameCN()); groupModel.setParamInfoModels(createParamInfoModels(group.getParams())); return groupModel; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java index 40962408..0f70bfec 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java @@ -152,8 +152,7 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements private void heartBeatsAndUpdateHAPool() { Map> map = new HashMap>(); for (Agent agent : this.getPool().values()) { - CheckHearBeat checkHearBeat = new CheckHearBeat(agent, - agentMessenger); + HearBeat checkHearBeat = new HearBeat(agent, agentMessenger); map.put(agent, this.excuExecutorService.submit(checkHearBeat)); } this.updateAgentPoolByHeart(map); @@ -351,7 +350,7 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements } -class CheckHearBeat implements Callable { +class HearBeat implements Callable { private Agent agent; private AgentMessenger agentMessenger; @@ -359,7 +358,7 @@ class CheckHearBeat implements Callable { return agentMessenger; } - public CheckHearBeat(Agent agent, AgentMessenger agentMessenger) { + public HearBeat(Agent agent, AgentMessenger agentMessenger) { this.agent = agent; this.agentMessenger = agentMessenger; }