Add support for reusable streaming
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 6 Jun 2019 10:26:37 +0000 (12:26 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 8 Jul 2019 08:48:19 +0000 (08:48 +0000)
commit610e52a1c130a9a1135d614b26daca766e49f738
treef2f3a17f8a71ec0885359971a4c17233c3cb6f9d
parent3bc8706eea2c21d7cbde2b31304ff1d421da543c
Add support for reusable streaming

With the actual implementations working on top of
NormalizedNodeStreamWriter, we gained the ability to flexibly
receive stream events.

This patch takes advantage of that flexibility by allowing
a ReusableImmutableNormalizedNodeStreamWriter to be the receiver
of the events -- thus allowing parts of the state involved in
building a NormalizedNode tree to be reused -- lowering GC
pressure.

A number of call sites, which can safely reuse such state are
converted to use the newly-introduced facility.

Change-Id: Iaf1b3ab2b2996e7004c036fc93a80a8ca8792314
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
java/org/opendaylight/controller/cluster/datastore/node/utils/stream/ForwardingNormalizedNodeDataInput.java
java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeDataInput.java