Separate lazy-versioned NormalizedNodeDataInput 82/82382/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 28 May 2019 13:28:55 +0000 (15:28 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 3 Jun 2019 13:48:19 +0000 (15:48 +0200)
commit733db329220a7d83f78c424da69eeb2c58c4b061
tree4afdb36fca1e846a8517c39100fb557bde2fce42
parent4c3b6e5ae5bbdc5c0a0e0cece051d9fcef44240a
Separate lazy-versioned NormalizedNodeDataInput

NormalizedNodeInputStreamReader is really only one implementation
of the streaming format, which happens to be bound to LITHIUM_VERSION.

This effectively means NormalizedNodeInputOutput can give out either
a version-bound reader or an unbound reader -- which we facilitate by
creating VersionedNormalizedNodeDataInput which is a simple forwarder
with lazily-initialized delegate.

Since this increases the number of (NormalizedNode)DataInput
implementations, we share as much code as possible through the use
of forwarding implementations.

JIRA: CONTROLLER-1898
Change-Id: I28713346730ed5bf7f912bf8afa5d8722b202035
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 69e914b3889a82fa2f7daa8d55e1aa0de23fb454)
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/ForwardingDataInput.java [new file with mode: 0644]
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/ForwardingNormalizedNodeDataInput.java [new file with mode: 0644]
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/InvalidNormalizedNodeStreamException.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeInputOutput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeInputStreamReader.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/VersionedNormalizedNodeDataInput.java [new file with mode: 0644]