BUG-8733: Add ListenableDOMDataTreeShard
Implementation reliance on DOMDataTreeChangePublisher is a mistake
coming from similarities between interfaces. DOMDataTreeShard interfaces
should work with DOMDataTreeListener instances, not DOMDataTreeChangeListener.
This patch introduces ListenableDOMDataTreeShard, which exposes a proper
SPI-level method for registering DOMDataTreeListeners.
It also adds AbstractStateAggregator, which can be used to efficiently
aggregate multiple listeners into a single upcall, without the synchronization
overhead of ShardedDOMDataTreeListenerContext.
This class is then used to build DOMDataTreeChangeListenerAggregator for
bridging the old approach with ListenableDOMDataTreeShard via a utility
proxy, CompatListenableDOMDataTreeShard.
We also introduce DOMDataTreeListenerAggregator, which performs aggregation
of multiple DOMDataTreeListeners and is useful for ListenableDOMDataTreeShard
implementations where requested subtrees live in multiple child shards.
Change-Id: I979610e032605ade6d68196d51ae62778311f8c6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f09e24084d3ed855d60647f822bae9f663599c75)