подправил кеширование отображаемых данных ( чтобы не распаковывать каждый раз список имен групп и прочее)
This commit is contained in:
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Global;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
|
||||
import Visual_DVM_2021.Passes.DeleteServerObjects;
|
||||
import Visual_DVM_2021.Passes.Server.DeleteServerObjects;
|
||||
public class DeleteConfiguration extends DeleteServerObjects<TestingServer, DVMConfiguration> {
|
||||
public DeleteConfiguration() {
|
||||
super(Global.testingServer, DVMConfiguration.class);
|
||||
|
||||
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Global;
|
||||
import TestingSystem.Common.Group.Group;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import Visual_DVM_2021.Passes.DeleteServerObjects;
|
||||
import Visual_DVM_2021.Passes.Server.DeleteServerObjects;
|
||||
public class DeleteGroup extends DeleteServerObjects<TestingServer, Group> {
|
||||
public DeleteGroup() {
|
||||
super(Global.testingServer, Group.class);
|
||||
|
||||
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Global;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration;
|
||||
import Visual_DVM_2021.Passes.DeleteServerObjects;
|
||||
import Visual_DVM_2021.Passes.Server.DeleteServerObjects;
|
||||
public class DeleteSapforConfiguration extends DeleteServerObjects<TestingServer, SapforConfiguration> {
|
||||
public DeleteSapforConfiguration() {
|
||||
super(Global.testingServer, SapforConfiguration.class);
|
||||
|
||||
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Global;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import TestingSystem.SAPFOR.SapforConfigurationCommand.SapforConfigurationCommand;
|
||||
import Visual_DVM_2021.Passes.DeleteServerObjects;
|
||||
import Visual_DVM_2021.Passes.Server.DeleteServerObjects;
|
||||
public class DeleteSapforConfigurationCommand extends DeleteServerObjects<TestingServer, SapforConfigurationCommand> {
|
||||
public DeleteSapforConfigurationCommand() {
|
||||
super(Global.testingServer, SapforConfigurationCommand.class);
|
||||
|
||||
@@ -2,7 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Global;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import Visual_DVM_2021.Passes.DeleteServerObjects;
|
||||
import Visual_DVM_2021.Passes.Server.DeleteServerObjects;
|
||||
public class DeleteTest extends DeleteServerObjects<TestingServer, Test> {
|
||||
public DeleteTest() {
|
||||
super(Global.testingServer, Test.class);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.UI.VisualCache.ConfigurationCache;
|
||||
import Common.UI.VisualCache.VisualCaches;
|
||||
import TestingSystem.Common.Group.Group;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
|
||||
@@ -32,8 +34,9 @@ public class ShowCurrentDVMConfigurationTests extends Pass_2021<DVMConfiguration
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
System.out.println("package="+target.id);
|
||||
Vector<Group> groups = target.getGroups();
|
||||
Vector<Test> tests = target.getTests();
|
||||
ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(target);
|
||||
Vector<Group> groups = cache.getGroups();
|
||||
Vector<Test> tests = cache.getTests();
|
||||
//-----
|
||||
//--
|
||||
for (Group group: groups)
|
||||
|
||||
@@ -2,6 +2,8 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.UI.UI;
|
||||
import Common.UI.VisualCache.ConfigurationCache;
|
||||
import Common.UI.VisualCache.VisualCaches;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Compiler.CompilerType;
|
||||
import GlobalData.Machine.MachineType;
|
||||
@@ -141,8 +143,9 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
|
||||
);
|
||||
//----
|
||||
for (DVMConfiguration configuration: configurations) {
|
||||
groups = configuration.getGroups();
|
||||
tests = configuration.getTests();
|
||||
ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(configuration);
|
||||
groups = cache.getGroups();
|
||||
tests = cache.getTests();
|
||||
//-
|
||||
for (Group group: groups){
|
||||
Vector<Test> groupTests = new Vector<>();
|
||||
|
||||
@@ -4,10 +4,11 @@ import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import Visual_DVM_2021.Passes.Server.DeleteServerObjects;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Vector;
|
||||
public abstract class DeleteTestingPackages<P extends TestingPackage> extends DeleteServerObjects<TestingServer, P>{
|
||||
public abstract class DeleteTestingPackages<P extends TestingPackage> extends DeleteServerObjects<TestingServer, P> {
|
||||
boolean delete_draft;
|
||||
public DeleteTestingPackages(Class<P> p) {
|
||||
super(Global.testingServer, p);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.Server;
|
||||
import Common.Database.DBObject;
|
||||
import Common.UI.VisualCache.VisualCache;
|
||||
import Common.UI.VisualCache.VisualCaches;
|
||||
import Repository.RepositoryServer;
|
||||
public class DeleteServerObject<S extends RepositoryServer, D extends DBObject> extends ServerObjectPass<S, D> {
|
||||
@Override
|
||||
@@ -11,6 +13,11 @@ public class DeleteServerObject<S extends RepositoryServer, D extends DBObject>
|
||||
target = (D) getDb().tables.get(d).getCurrent();
|
||||
return getDb().tables.get(d).CheckCurrent(Log) && getDb().tables.get(d).ShowDeleteObjectDialog(target);
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
super.performPreparation();
|
||||
VisualCaches.DeleteCahce(target);
|
||||
}
|
||||
//Очищаем все связанные таблицы, чтобы не допустить перерисовки во время удаления объекта.
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
package Visual_DVM_2021.Passes.Server;
|
||||
import Common.Current;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.DBTable;
|
||||
import Common.Database.Database;
|
||||
import Common.UI.UI;
|
||||
import Common.UI.VisualCache.VisualCaches;
|
||||
import Repository.RepositoryServer;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -48,6 +49,13 @@ public class DeleteServerObjects <S extends RepositoryServer, D extends DBObject
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
super.performPreparation();
|
||||
for (Object key: target){
|
||||
VisualCaches.DeleteCahce(d, key);
|
||||
}
|
||||
}
|
||||
//Очищаем все связанные таблицы, чтобы не допустить перерисовки во время удаления объекта.
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.Server;
|
||||
import Common.Database.DBObject;
|
||||
import Common.UI.VisualCache.VisualCaches;
|
||||
import Repository.RepositoryServer;
|
||||
public class EditServerObject<S extends RepositoryServer, D extends DBObject> extends ServerObjectPass<S, D> {
|
||||
//--
|
||||
@@ -13,6 +14,12 @@ public class EditServerObject<S extends RepositoryServer, D extends DBObject> ex
|
||||
target = (D) getDb().tables.get(d).getCurrent();
|
||||
return getDb().tables.get(d).CheckCurrent(Log) && getDb().tables.get(d).ShowEditObjectDialog(target);
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
super.performPreparation();
|
||||
//очистить кэш.
|
||||
VisualCaches.DeleteCahce(target);
|
||||
}
|
||||
//--
|
||||
public EditServerObject(S server_in, Class<D> d_in) {
|
||||
super(server_in, d_in);
|
||||
|
||||
Reference in New Issue
Block a user