удаление отладочной печати сравнения и не только
This commit is contained in:
@@ -65,12 +65,10 @@ public abstract class Component extends DBObject implements Loggable {
|
||||
}
|
||||
public void ReplaceOldFile() throws Exception {
|
||||
Utils.delete_with_check(getFile());
|
||||
System.out.println("old file removed");
|
||||
//-скопировать файл
|
||||
Files.move(getNewFile().toPath(), getFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
//удалить новый файл.
|
||||
Utils.delete_with_check(getNewFile());
|
||||
System.out.println("new file removed");
|
||||
}
|
||||
public void Update() throws Exception {
|
||||
if (!getNewFile().setExecutable(true)) throw new PassException("Не удалось разрешить файл\n" +
|
||||
|
||||
@@ -64,8 +64,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
}
|
||||
public void ReadMessageIn() throws Exception {
|
||||
message_in = (MessageJtoJ) in.readObject();
|
||||
System.out.println("message = " + Utils.DQuotes(message_in.getMessage()));
|
||||
System.out.println("command = " + Utils.DQuotes(message_in.getCommand()));
|
||||
}
|
||||
public void SendMessageOut(MessageJtoJ messageJtoJ) throws Exception {
|
||||
message_out = messageJtoJ;
|
||||
@@ -73,8 +71,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
}
|
||||
public void ConvertStatistic() throws Exception {
|
||||
message_in = (MessageJtoJ) in.readObject();
|
||||
System.out.println("message = " + Utils.DQuotes(message_in.getMessage()));
|
||||
System.out.println("command = " + Utils.DQuotes(message_in.getCommand()));
|
||||
String message = Current.getSapfor().readStatForAnalyzer(message_in.getMessage());
|
||||
message_out = new MessageJtoJ(message, message_in.getCommand());
|
||||
out.writeObject(message_out);
|
||||
@@ -85,7 +81,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
server_thread = new Thread(() -> {
|
||||
try {
|
||||
client = serverSocket.accept();
|
||||
System.out.println("Основной цикл анализатора статистик начат..");
|
||||
out = new ObjectOutputStream(client.getOutputStream());
|
||||
in = new ObjectInputStream(client.getInputStream());
|
||||
//------------------------------------------------------->>;
|
||||
@@ -95,26 +90,17 @@ public class PerformanceAnalyzer extends Component {
|
||||
}
|
||||
});
|
||||
server_thread.start();
|
||||
System.out.println("Нить сервера запущена");
|
||||
}
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
try {
|
||||
StartServer(() -> {
|
||||
System.out.println("Запрос версии анализатора..");
|
||||
ReadMessageIn(); //на версию.
|
||||
version = (long) Double.parseDouble(message_in.getMessage());
|
||||
ReadMessageIn(); //на дату.
|
||||
date_text = message_in.getMessage();
|
||||
System.out.println("Завершено");
|
||||
return null;
|
||||
});
|
||||
//--
|
||||
/*
|
||||
Utils.performProcess("java", "-jar",
|
||||
"-Dprism.order=sw",
|
||||
Utils.DQuotes(Global.performanceAnalyzer.getFile()), "--port", String.valueOf(getPort()), "--version");
|
||||
*/
|
||||
Utils.startScript(Global.TempDirectory, Global.ComponentsDirectory, "analyzer",
|
||||
"java -jar -Dprism.order=sw "+ Utils.DQuotes(Global.performanceAnalyzer.getFile()) + " --port "+ getPort()+ " --version" );
|
||||
//-
|
||||
@@ -123,7 +109,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
Shutdown();
|
||||
System.out.println("FINALIZE");
|
||||
}
|
||||
}
|
||||
public void ServerBody() {
|
||||
@@ -153,7 +138,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
Shutdown();
|
||||
System.out.println("FINALIZE");
|
||||
isActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user