2 * Copyright (c) 2014 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
9 package org.opendaylight.controller.cluster.datastore.node.utils.stream;
11 import java.io.IOException;
12 import java.io.ObjectInputStream;
13 import java.io.ObjectOutputStream;
14 import java.io.Serializable;
15 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
17 public class SampleNormalizedNodeSerializable implements Serializable {
18 private static final long serialVersionUID = 1L;
20 private NormalizedNode<?, ?> input;
22 public SampleNormalizedNodeSerializable(final NormalizedNode<?, ?> input) {
26 public NormalizedNode<?, ?> getInput() {
30 private void readObject(final ObjectInputStream stream) throws IOException {
31 this.input = NormalizedNodeInputOutput.newDataInput(stream).readNormalizedNode();
34 private void writeObject(final ObjectOutputStream stream) throws IOException {
35 NormalizedNodeInputOutput.newDataOutput(stream).writeNormalizedNode(input);