Bug 2327: Handle binary data in NormalizedNode streaming 97/12797/5
authortpantelis <tpanteli@brocade.com>
Wed, 12 Nov 2014 22:09:15 +0000 (17:09 -0500)
committertpantelis <tpanteli@brocade.com>
Sun, 18 Jan 2015 09:52:29 +0000 (04:52 -0500)
commitd0bfebae1d8f056220bc2f5b043f1f13b3b8d4e6
treea3733efca45abb727c3879b75839841526eaae9e
parent5dae3ebb0b0560c7552fe835abbce8772285d7e0
Bug 2327: Handle binary data in NormalizedNode streaming

Also made optimization improvements to reuse primitive (using valueOf) and coded String
values (using intern) when read from the stream.

Also added a reusable StringBuilder instance for building qnames. After
use, the StringBuilder is cleared via the delete method. This
effectively resets the char count to 0. Previously, the
code used string concatenation which the compiler will translate to use
an imlicit StringBuilder. These changes avoid the implicit creation of a
StringBuilder instance each time which should reduce object churn.

Change-Id: Ic9c745d97d1b5eed2dd24bc5d252d05ac1355cbb
Signed-off-by: tpantelis <tpanteli@brocade.com>
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/NormalizedNodeOutputStreamWriter.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/ValueTypes.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeStreamReaderWriterTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/util/TestModel.java
opendaylight/md-sal/sal-clustering-commons/src/test/resources/odl-datastore-test.yang

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.