Description of your use case: (detailed description or executable reproducer, e.g. GitHub repo)
I noticed that when I use the simple-view and have to manage tasks and dataEntries, the SimpleTaskpoolService also keeps an in mem ConcurrentMap of dataEntries
private val dataEntries = ConcurrentHashMap<String, DataEntry>()
It is my understanding that this map is a complete in memory copy of the map contained in the SimpleDataEntryService.
Current Behaviour
s.a.
Wanted Behaviour
Both services share an in-mem dataEntries map. This not only saves memory consumption but also simplifies testing of scenarios where tasks and dataEntries are used (currently I have to call "on" in two services to have a correct state).
Possible Workarounds
I guess it would be enough to make the ConcurrentHashMap properties "injectable" via constructor, so I can create one instance up front and use this in both services.
Scenario
I noticed that when I use the simple-view and have to manage tasks and dataEntries, the SimpleTaskpoolService also keeps an in mem ConcurrentMap of dataEntries
private val dataEntries = ConcurrentHashMap<String, DataEntry>()
It is my understanding that this map is a complete in memory copy of the map contained in the SimpleDataEntryService.
Current Behaviour
s.a.
Wanted Behaviour
Both services share an in-mem dataEntries map. This not only saves memory consumption but also simplifies testing of scenarios where tasks and dataEntries are used (currently I have to call "on" in two services to have a correct state).
Possible Workarounds
I guess it would be enough to make the ConcurrentHashMap properties "injectable" via constructor, so I can create one instance up front and use this in both services.