mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-24 22:48:34 +00:00
Fixed failing test case by adjusting clearState to clear persistence
This commit is contained in:
+9
-5
@@ -90,7 +90,7 @@ public class WindEstimationFactoryServiceImpl extends
|
||||
MODEL_STORE.importPersistedModels(serializedModelsForDomainType, domainType);
|
||||
}
|
||||
}
|
||||
clearState();
|
||||
reloadWindEstimationModels();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,15 +138,19 @@ public class WindEstimationFactoryServiceImpl extends
|
||||
for (ModelDomainType domainType : modelDomainTypesRequiredByWindEstimation) {
|
||||
MODEL_STORE.deleteAll(domainType);
|
||||
}
|
||||
clearState();
|
||||
reloadWindEstimationModels();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearState() throws Exception {
|
||||
clearReplicaState();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears/Reloads all caches with machine learning models. Notifies ready state change listeners about the new ready
|
||||
* state of this wind estimation instance.
|
||||
*/
|
||||
@Override
|
||||
public void clearState() {
|
||||
public void reloadWindEstimationModels() {
|
||||
maneuverClassifiersCache.clearCache();
|
||||
gaussianBasedTwdTransitionDistributionCache.clearCache();
|
||||
List<WindEstimationModelsChangedListener> modelsChangedListeners;
|
||||
@@ -169,7 +173,7 @@ public class WindEstimationFactoryServiceImpl extends
|
||||
MODEL_STORE.deleteAll(domainType);
|
||||
MODEL_STORE.importPersistedModels(exportedModels, domainType);
|
||||
}
|
||||
clearState();
|
||||
reloadWindEstimationModels();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user