You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the simple test below with a network containing one generator "GEN" without extension, we could avoid fetching on server when the extension or equipment does not exist. We should "cache" the fact that the equipment/extension does not exist in the network. If it does not exist, we should not fetch from the server.
@TestpublicvoidtestExtensionGetIdentifiable() {
try (NetworkStoreServiceservice = createNetworkStoreService(randomServerPort)) {
Networknetwork = EurostagTutorialExample1Factory.create(service.getNetworkFactory());
service.flush(network);
}
try (NetworkStoreServiceservice = createNetworkStoreService(null, randomServerPort)) {
Networknetwork = service.getNetwork(service.getNetworkIds().keySet().iterator().next());
Generatorgen = network.getGenerator("GEN"); // fetch /networks/fbaeae14-65e9-4a85-91eb-bb96b186a9ab/0/generators/GENnetwork.getGenerator("GEN"); // does not fetch as already cached abovenetwork.getGenerator("GEN123"); // fetch /networks/fbaeae14-65e9-4a85-91eb-bb96b186a9ab/0/generators/GEN123 network.getGenerator("GEN123"); // does not fetch as we know it does not exist network.getGenerator("GEN123"); // does not fetch as we know it does not existnetwork.getGenerator("GEN123"); // does not fetch as we know it does not existgen.getExtension(ActivePowerControl.class); // fetch /networks/fbaeae14-65e9-4a85-91eb-bb96b186a9ab/0/identifiables/GEN/extensions/activePowerControlgen.getExtension(ActivePowerControl.class); // does not fetch as we know it does not existgen.getExtension(ActivePowerControl.class); // does not fetch as we know it does not existgen.getExtension(ActivePowerControl.class); // does not fetch as we know it does not exist
}
}
Describe the motivation
No response
Extra Information
No response
The text was updated successfully, but these errors were encountered:
Describe the current behavior
In the simple test below with a network containing one generator "GEN" without extension, we could avoid fetching on server when the extension or equipment does not exist. We should "cache" the fact that the equipment/extension does not exist in the network. If it does not exist, we should not fetch from the server.
Describe the expected behavior
Describe the motivation
No response
Extra Information
No response
The text was updated successfully, but these errors were encountered: