ExtendedStorageManager for an arbitrary amount of ExtendedStorage #278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This introduces an ExtendedStorageManager, which, by itself, is also an ExtendedStorage and can handle an arbitrary amount of sub-storages.
In addition it introduces an ExtendedStorageAccess (similar to NodeAccess) interface (and implementation).
To save space in common situation, during graph creation, one can specify either
a) a normal ExtendedStorage, in this case, it will mainly matche the old behaviour of storing ints directly in the graph or
b) an ExtendedStorageManager. In this case, the in-graph-extended-storage will point to the ExtendedStorageManager, which will then contain the ints.
It is possible to only use a subset of the ExtendedStorages that were provided during Graph creation. The ExtendedStorageManager will then figure out what to do, with the help of some properties that were written to the "properties" file.
The GHExtendedStorageAccess is able to correctly determine if it is working on a normal ExtendedStorage object or if it is working on an ExtendedStorageManager and will act accordingly.
A couple of tests were added to make sure that the ExtendedStorageManager and Access class work as intended.