NormalizedNodeDataOutput should be AutoCloseable 46/34846/3
authorRobert Varga <rovarga@cisco.com>
Wed, 17 Feb 2016 15:13:09 +0000 (16:13 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 17 Feb 2016 22:10:00 +0000 (22:10 +0000)
We expect to use autocloseable in implementations, make sure this this
reflected upwards.

Change-Id: Ia7e6b27e514cf04e24b0cdf161510a035846ba12
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeDataOutput.java

index 1ea933c73d038d718787460b8b7efbb464f96dea..6efe254e09936ac655e1f86591c88c23a5875322 100644 (file)
@@ -18,8 +18,11 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;;
  * Interface for emitting {@link NormalizedNode}s, {@link YangInstanceIdentifier}s and {@link PathArgument}s.
  */
 @Beta
-public interface NormalizedNodeDataOutput extends DataOutput {
+public interface NormalizedNodeDataOutput extends AutoCloseable, DataOutput {
     void writeNormalizedNode(NormalizedNode<?, ?> normalizedNode) throws IOException;
     void writePathArgument(PathArgument pathArgument) throws IOException;
     void writeYangInstanceIdentifier(YangInstanceIdentifier identifier) throws IOException;
+
+    @Override
+    void close() throws IOException;
 }