2 * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.cluster.datastore.node.utils.stream;
10 import java.io.DataOutput;
13 * NormalizedNodeOutputStreamWriter will be used by distributed datastore to send normalized node in
15 * A stream writer wrapper around this class will write node objects to stream in recursive manner.
16 * for example - If you have a ContainerNode which has a two LeafNode as children, then
18 * {@link #startContainerNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier, int)},
20 * {@link #leafNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier, Object)} twice
21 * and then, {@link #endNode()} to end container node.
23 * <p>Based on the each node, the node type is also written to the stream, that helps in reconstructing the object,
26 class NormalizedNodeOutputStreamWriter extends NeonSR2NormalizedNodeOutputStreamWriter {
27 NormalizedNodeOutputStreamWriter(final DataOutput output) {