From 23709d0a94ba898dad4397371c78929baa691432 Mon Sep 17 00:00:00 2001 From: luqiong <605601787@qq.com> Date: Tue, 9 Sep 2014 10:18:16 +0800 Subject: [PATCH] remove all overrides remove all overrides --- .../master/domain/entity/RunningAgentDB.java | 2 -- .../master/domain/entity/TestPlanScript.java | 1 - .../master/domain/service/TestPlanEngine.java | 1 - .../transaction/impl/TestPlanLoadApplication.java | 2 -- .../communication/impl/AgentMessengerImpl.java | 8 ++------ .../highavailable/impl/HighAvailablePoolImpl.java | 1 - .../src/test/java/stubs/HighAvailableImpl.java | 13 ------------- .../src/test/java/stubs/Mock_AgentMessenger.java | 14 +++++++------- .../src/test/java/stubs/Mock_MonitorMessenger.java | 6 ------ Bench4Q-Web/src/main/webapp/script.jsp | 1 + 10 files changed, 10 insertions(+), 39 deletions(-) diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java index 10aab285..58008f33 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/RunningAgentDB.java @@ -163,7 +163,6 @@ public class RunningAgentDB implements RunningAgentInterface { return this.getTestPlanScript(); } - @Override public RunningAgentInterface completeWithRunningScript( RunningScriptInterface runningScript) { this.setTestPlanScript((TestPlanScript) runningScript); @@ -241,7 +240,6 @@ public class RunningAgentDB implements RunningAgentInterface { this.setHasSubstitute(true); } - @Override public TestBriefStatusModel briefAll() { if (this.isStoped()) { return null; diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java index 6749f174..7770f532 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/entity/TestPlanScript.java @@ -305,7 +305,6 @@ public class TestPlanScript implements RunningScriptInterface { return true; } - @Override @Transient public Date getStartTime() { return this.getTestPlan().getCurrentStartTime(); diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java index f4e00149..6f5d589b 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/service/TestPlanEngine.java @@ -204,7 +204,6 @@ public class TestPlanEngine implements TaskCompleteCallback, } } - @Override public void executePendingTestPlan() { pickATestPlan(); } diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/transaction/impl/TestPlanLoadApplication.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/transaction/impl/TestPlanLoadApplication.java index 35a6f159..aafcb69c 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/transaction/impl/TestPlanLoadApplication.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/valueobject/transaction/impl/TestPlanLoadApplication.java @@ -50,7 +50,6 @@ public class TestPlanLoadApplication implements Transaction { this.getHighAvailableAgentPool().checkAllHeartBeat(); } - @Override public TestPlanStatus execute() throws Exception { synchronized (this.highAvailableAgentPool) { if (!hasEnoughMaxLoad(this.getTestPlan().getRequiredLoad())) { @@ -72,7 +71,6 @@ public class TestPlanLoadApplication implements Transaction { return TestPlanStatus.InRunning; } - @Override public void rollBack() { for (TestPlanScript testPlanScript : this.getTestPlan() .getTestPlanScripts()) { diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/impl/AgentMessengerImpl.java b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/impl/AgentMessengerImpl.java index 14bf8eb8..977105d5 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/impl/AgentMessengerImpl.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/communication/impl/AgentMessengerImpl.java @@ -67,7 +67,6 @@ public class AgentMessengerImpl implements AgentMessenger { final int requiredLoad) { return this.executorService .submit(new Callable() { - @Override public RunScenarioResultModel call() throws Exception { return bookTest(agent, requiredLoad); } @@ -105,7 +104,6 @@ public class AgentMessengerImpl implements AgentMessenger { final ScheduleModel scheduleModel, final Date realStartDate) { return this.executorService .submit(new Callable() { - @Override public RunScenarioResultModel call() throws Exception { return submitScenrioWithParams(agent, agentRunId, paramFiles, runScenarioModel, scheduleModel, @@ -139,7 +137,6 @@ public class AgentMessengerImpl implements AgentMessenger { final UUID agentRunId) { return this.executorService .submit(new Callable() { - @Override public RunScenarioResultModel call() throws Exception { return runWithParams(agent, agentRunId); } @@ -175,7 +172,7 @@ public class AgentMessengerImpl implements AgentMessenger { final UUID runId) { return this.executorService .submit(new Callable() { - @Override + public TestBriefStatusModel call() throws Exception { return scriptBriefAll(agent, runId); } @@ -206,7 +203,6 @@ public class AgentMessengerImpl implements AgentMessenger { public Future stopAsync(final Agent agent, final UUID runId) { return this.executorService.submit(new Callable() { - @Override public StopTestModel call() throws Exception { return stop(agent, runId); } @@ -235,7 +231,7 @@ public class AgentMessengerImpl implements AgentMessenger { public Future getStatusAsync(final Agent agent) { return this.executorService.submit(new Callable() { - @Override + public ServerStatusModel call() throws Exception { return getStatus(agent); } 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 6416dd6e..5aa2dd95 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 @@ -337,7 +337,6 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements } } - @Override public ServerStatusModel queryAgentStatus(Agent agent) { return this.getAgentMessenger().getStatus(agent); } diff --git a/Bench4Q-Master/src/test/java/stubs/HighAvailableImpl.java b/Bench4Q-Master/src/test/java/stubs/HighAvailableImpl.java index c9210c4d..4ebe41b6 100644 --- a/Bench4Q-Master/src/test/java/stubs/HighAvailableImpl.java +++ b/Bench4Q-Master/src/test/java/stubs/HighAvailableImpl.java @@ -23,12 +23,10 @@ public class HighAvailableImpl implements HighAvailablePool { .put(hostName, Agent.createAgentWithoutId(hostName, 6565, 500)); } - @Override public Map getPool() { return this.pool; } - @Override public Long getMaxAvailableLoad() { Long result = 0L; for (Agent agent : this.pool.values()) { @@ -37,7 +35,6 @@ public class HighAvailableImpl implements HighAvailablePool { return result; } - @Override public int getCurrentAvailableLoad() { int result = 0; for (Agent agent : this.pool.values()) { @@ -46,58 +43,48 @@ public class HighAvailableImpl implements HighAvailablePool { return result; } - @Override public void checkAllHeartBeat() { } - @Override public void checkHeartBeat(Agent agent) { } - @Override public void cleanUpAboutTestPlan( Collection runningScripts) { } - @Override public ServerStatusModel queryAgentStatus(Agent agent) { return null; } - @Override public void add(Agent agent) { // TODO Auto-generated method stub } - @Override public void setObserver(CurrentLoadObserver currentLoadObserver) { // TODO Auto-generated method stub } - @Override public Map getAgentRunBlotters() { // TODO Auto-generated method stub return null; } - @Override public int blotterSize() { // TODO Auto-generated method stub return 0; } - @Override public void remove(Agent agent) { // TODO Auto-generated method stub } - @Override public List applyFor(int load) { // TODO Auto-generated method stub return null; diff --git a/Bench4Q-Master/src/test/java/stubs/Mock_AgentMessenger.java b/Bench4Q-Master/src/test/java/stubs/Mock_AgentMessenger.java index 5d458706..40dc2cd6 100644 --- a/Bench4Q-Master/src/test/java/stubs/Mock_AgentMessenger.java +++ b/Bench4Q-Master/src/test/java/stubs/Mock_AgentMessenger.java @@ -28,12 +28,12 @@ public class Mock_AgentMessenger implements AgentMessenger { private UUID testId = UUID.randomUUID(); - @Override + public RunScenarioResultModel bookTest(Agent agent, int requireLoad) { return new RunScenarioResultModel(this.testId); } - @Override + public RunScenarioResultModel submitScenrioWithParams(Agent agent, UUID agentRunId, List paramFiles, RunScenarioModel runScenarioModel, @@ -41,12 +41,12 @@ public class Mock_AgentMessenger implements AgentMessenger { return new RunScenarioResultModel(this.testId); } - @Override + public RunScenarioResultModel runWithParams(Agent agent, UUID agentRunId) { return new RunScenarioResultModel(this.testId); } - @Override + public TestBriefStatusModel scriptBriefAll(Agent agent, UUID runId) { if (isDead(agent)) { return null; @@ -67,7 +67,7 @@ public class Mock_AgentMessenger implements AgentMessenger { return agent.getCurrentEnumStatus() == AgentStatus.BreakDown; } - @Override + public StopTestModel stop(Agent agent, UUID runId) { // if (runId == this.testId) { // return new StopTestModel(true); @@ -75,7 +75,7 @@ public class Mock_AgentMessenger implements AgentMessenger { return new StopTestModel(true); } - @Override + public ServerStatusModel getStatus(Agent agent) { ServerStatusModel result = new ServerStatusModel(); if (agent.getCurrentEnumStatus() == AgentStatus.InIdle) { @@ -89,7 +89,7 @@ public class Mock_AgentMessenger implements AgentMessenger { return null; } - @Override + public Future getStatusAsync(Agent agent) { return new AsyncResult(getStatus(agent)); } diff --git a/Bench4Q-Master/src/test/java/stubs/Mock_MonitorMessenger.java b/Bench4Q-Master/src/test/java/stubs/Mock_MonitorMessenger.java index 588d3f2e..c1642ebc 100644 --- a/Bench4Q-Master/src/test/java/stubs/Mock_MonitorMessenger.java +++ b/Bench4Q-Master/src/test/java/stubs/Mock_MonitorMessenger.java @@ -14,7 +14,6 @@ import org.springframework.stereotype.Component; @Component public class Mock_MonitorMessenger implements MonitorMessenger { - @Override public MonitorMain monitorModel(String hostName, int port) { MonitorMain result = new MonitorMain(); result.setFinished(false); @@ -27,27 +26,22 @@ public class Mock_MonitorMessenger implements MonitorMessenger { return result; } - @Override public PhysicalDiskModel physicalDisk(String hostName, int port) { return monitorModel(hostName, port).getPhysicalDiskModel(); } - @Override public MemoryModel memory(String hostName, int port) { return monitorModel(hostName, port).getMemoryModel(); } - @Override public ProcessorModel processor(String hostName, int port) { return monitorModel(hostName, port).getProcessorModel(); } - @Override public NetworkInterfaceModel networkInterface(String hostName, int port) { return monitorModel(hostName, port).getNetworkInterfaceModel(); } - @Override public ProcessModel process(String hostName, int port) { return monitorModel(hostName, port).getProcessModel(); } diff --git a/Bench4Q-Web/src/main/webapp/script.jsp b/Bench4Q-Web/src/main/webapp/script.jsp index 00b0f46e..5febc557 100644 --- a/Bench4Q-Web/src/main/webapp/script.jsp +++ b/Bench4Q-Web/src/main/webapp/script.jsp @@ -2,6 +2,7 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>