Switch default output stream version
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / datastore / node / utils / stream / NormalizedNodeOutputStreamWriter.java
1 /*
2  * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster.datastore.node.utils.stream;
9
10 import java.io.DataOutput;
11
12 /**
13  * NormalizedNodeOutputStreamWriter will be used by distributed datastore to send normalized node in
14  * a stream.
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
17  * you will first call
18  * {@link #startContainerNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier, int)},
19  * then will call
20  * {@link #leafNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier, Object)} twice
21  * and then, {@link #endNode()} to end container node.
22  *
23  * <p>Based on the each node, the node type is also written to the stream, that helps in reconstructing the object,
24  * while reading.
25  */
26 class NormalizedNodeOutputStreamWriter extends SodiumNormalizedNodeOutputStreamWriter {
27     NormalizedNodeOutputStreamWriter(final DataOutput output) {
28         super(output);
29     }
30 }