Mercurial > hg > Database > Christie
changeset 210:9a1d9c99e708
fix Command run to execute
author | akahori |
---|---|
date | Mon, 11 Mar 2019 16:45:37 +0900 |
parents | 2ecb3a93b8ae |
children | 473f10f24b13 |
files | src/main/java/christie/datagear/LocalDataGearManager.java src/main/java/christie/datagear/RemoteDataGearManager.java src/main/java/christie/datagear/command/CloseCommand.java src/main/java/christie/datagear/command/Command.java src/main/java/christie/datagear/command/FinishCommand.java src/main/java/christie/datagear/command/RemoteTakeCommand.java src/main/java/christie/datagear/command/TakeCommand.java |
diffstat | 7 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/christie/datagear/LocalDataGearManager.java Mon Mar 11 16:21:30 2019 +0900 +++ b/src/main/java/christie/datagear/LocalDataGearManager.java Mon Mar 11 16:45:37 2019 +0900 @@ -22,7 +22,7 @@ case PUT: dataGears.setData(cm); - if (waitList.containsKey(cm.key)){//ここもsyncronized? + if (waitList.containsKey(cm.key)){ runCommand(waitList.getAndRemoveCommand(cm.key)); } @@ -33,13 +33,13 @@ case REMOTEPEEK: if (dataGears.containsKey(cm.key)) { cm.setDg(dataGears.getData(cm)); - cm.run(); + cm.execute(); } else { waitList.add(cm); } break; case REPLY: - cm.run(); + cm.execute(); break; }
--- a/src/main/java/christie/datagear/RemoteDataGearManager.java Mon Mar 11 16:21:30 2019 +0900 +++ b/src/main/java/christie/datagear/RemoteDataGearManager.java Mon Mar 11 16:45:37 2019 +0900 @@ -89,7 +89,7 @@ public void resolveWaitCommand(String key, DataGear dg) { Command cm = waitList.getAndRemoveCommand(key); cm.setDg(dg); - cm.run(); + cm.execute(); }
--- a/src/main/java/christie/datagear/command/CloseCommand.java Mon Mar 11 16:21:30 2019 +0900 +++ b/src/main/java/christie/datagear/command/CloseCommand.java Mon Mar 11 16:45:37 2019 +0900 @@ -17,7 +17,7 @@ } @Override - public void run() { + public void execute() { connection.close(); } }
--- a/src/main/java/christie/datagear/command/Command.java Mon Mar 11 16:21:30 2019 +0900 +++ b/src/main/java/christie/datagear/command/Command.java Mon Mar 11 16:45:37 2019 +0900 @@ -21,7 +21,7 @@ public Class clazz = null;// for remote public Connection connection = null;//for reply - public abstract void run(); + public abstract void execute(); //public abstract void run(Object dataGear); //for remote
--- a/src/main/java/christie/datagear/command/FinishCommand.java Mon Mar 11 16:21:30 2019 +0900 +++ b/src/main/java/christie/datagear/command/FinishCommand.java Mon Mar 11 16:45:37 2019 +0900 @@ -13,7 +13,7 @@ @Override - public void run() { + public void execute() { System.exit(0); } @Override
--- a/src/main/java/christie/datagear/command/RemoteTakeCommand.java Mon Mar 11 16:21:30 2019 +0900 +++ b/src/main/java/christie/datagear/command/RemoteTakeCommand.java Mon Mar 11 16:45:37 2019 +0900 @@ -32,7 +32,7 @@ } @Override - public void run() { + public void execute() { new ReplyCommand(this).run(); }