Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add support for coded QNames/AugmentationIdentifiers
[controller.git]
/
opendaylight
/
md-sal
/
sal-clustering-commons
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
node
/
utils
/
stream
/
AbstractNormalizedNodeDataOutput.java
diff --git
a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractNormalizedNodeDataOutput.java
b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractNormalizedNodeDataOutput.java
index 02bebebd2949d397d9234a27215f1e84de0ce299..0506fd2fcf3655196060f5b0ea2821cff8de461c 100755
(executable)
--- a/
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractNormalizedNodeDataOutput.java
+++ b/
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractNormalizedNodeDataOutput.java
@@
-289,7
+289,7
@@
abstract class AbstractNormalizedNodeDataOutput implements NormalizedNodeDataOut
LOG.trace("Starting a new augmentation node");
output.writeByte(NodeTypes.AUGMENTATION_NODE);
LOG.trace("Starting a new augmentation node");
output.writeByte(NodeTypes.AUGMENTATION_NODE);
- write
QNameSet(identifier.getPossibleChildNames()
);
+ write
AugmentationIdentifier(identifier
);
}
@Override
}
@Override
@@
-411,10
+411,8
@@
abstract class AbstractNormalizedNodeDataOutput implements NormalizedNodeDataOut
case PathArgumentTypes.AUGMENTATION_IDENTIFIER :
case PathArgumentTypes.AUGMENTATION_IDENTIFIER :
- AugmentationIdentifier augmentationIdentifier = (AugmentationIdentifier) pathArgument;
-
// No Qname in augmentation identifier
// No Qname in augmentation identifier
- write
QNameSet(augmentationIdentifier.getPossibleChildNames()
);
+ write
AugmentationIdentifier((AugmentationIdentifier) pathArgument
);
break;
default :
throw new IllegalStateException("Unknown node identifier type is found : "
break;
default :
throw new IllegalStateException("Unknown node identifier type is found : "
@@
-435,11
+433,12
@@
abstract class AbstractNormalizedNodeDataOutput implements NormalizedNodeDataOut
}
}
}
}
- private void writeQNameSet(final Set<QName> children) throws IOException {
+ void writeAugmentationIdentifier(final AugmentationIdentifier aid) throws IOException {
+ final Set<QName> qnames = aid.getPossibleChildNames();
// Write each child's qname separately, if list is empty send count as 0
// Write each child's qname separately, if list is empty send count as 0
- if (
children != null && !children
.isEmpty()) {
- output.writeInt(
children
.size());
- for (QName qname :
children
) {
+ if (
!qnames
.isEmpty()) {
+ output.writeInt(
qnames
.size());
+ for (QName qname :
qnames
) {
writeQName(qname);
}
} else {
writeQName(qname);
}
} else {