I am searching for a way to reload model data into Orekit without having to restart my application. At the moment I am mostly concerned with UTC-TAI history, but other files might come up later.
As I mentioned on the old mailing lists about a year ago, this is not as easy as it sounds because the model data is cached inside the factories, so simply registering a new data file is not enough. I recently discovered the method clearFactories() from the test class Utils, which appears to do exactly what I want. However it is part of Orekit’s unit tests, which means it is not accessible for users of the library.
I have a few questions and concerns about using this method in “production” code, maybe someone here could give me a few pointers ?
if I have already requested a timescale from the factory, and affected it to a local variable : will the timescale be updated with the new data even if I do not specifically go through the factory again ?
what would happen if this method were to be called in a multi-thread program ? I think the case might have already come up if Orekit unit tests are performed in parallel. Are all threads using the new data, possibly leading to inconsistent computations (because of a unexpected data change in the middle of a computation) ? Or are the threads completing their computations with the previous data, the new data applying only for new computations ?
If I decide to follow this route, I will perform more tests to ensure the behavior corresponds to my needs. But this is not so easy to test, so I thought it could be wise to ask first, just to see if this has a chance to work.
Thanks in advance for your help