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 cddcd8d17a09e552a7935e6f0f933e3931c973da..002781a9b3e783bf07ec3a566223962cb8958d16 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
@@
-276,7
+276,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
@@
-410,10
+410,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 : "
@@
-434,11
+432,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 {