Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
BUG-509: cleanup StoreMetadataNode
[controller.git]
/
opendaylight
/
md-sal
/
sal-dom-broker
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
md
/
sal
/
dom
/
store
/
impl
/
tree
/
data
/
StoreMetadataNode.java
diff --git
a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/StoreMetadataNode.java
b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/StoreMetadataNode.java
index 0ee0d9b32c990685c8169eb0430d35d64dacc2e0..77186a6509913742c97a9606f2e89f7691e941a8 100644
(file)
--- a/
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/StoreMetadataNode.java
+++ b/
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/StoreMetadataNode.java
@@
-13,7
+13,6
@@
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.HashMap;
import java.util.Map;
-import org.opendaylight.controller.md.sal.dom.store.impl.tree.StoreTreeNode;
import org.opendaylight.yangtools.concepts.Identifiable;
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.concepts.Identifiable;
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
@@
-24,7
+23,7
@@
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.primitives.UnsignedLong;
import com.google.common.base.Preconditions;
import com.google.common.primitives.UnsignedLong;
-class StoreMetadataNode implements Immutable, Identifiable<PathArgument>
, StoreTreeNode<StoreMetadataNode>
{
+class StoreMetadataNode implements Immutable, Identifiable<PathArgument> {
private final Map<PathArgument, StoreMetadataNode> children;
private final UnsignedLong nodeVersion;
private final UnsignedLong subtreeVersion;
private final Map<PathArgument, StoreMetadataNode> children;
private final UnsignedLong nodeVersion;
private final UnsignedLong subtreeVersion;
@@
-37,7
+36,7
@@
class StoreMetadataNode implements Immutable, Identifiable<PathArgument>, StoreT
* @param subtreeVersion
* @param children Map of children, must not be modified externally
*/
* @param subtreeVersion
* @param children Map of children, must not be modified externally
*/
- pr
otected
StoreMetadataNode(final NormalizedNode<?, ?> data, final UnsignedLong nodeVersion,
+ pr
ivate
StoreMetadataNode(final NormalizedNode<?, ?> data, final UnsignedLong nodeVersion,
final UnsignedLong subtreeVersion, final Map<PathArgument, StoreMetadataNode> children) {
this.nodeVersion = Preconditions.checkNotNull(nodeVersion);
this.subtreeVersion = Preconditions.checkNotNull(subtreeVersion);
final UnsignedLong subtreeVersion, final Map<PathArgument, StoreMetadataNode> children) {
this.nodeVersion = Preconditions.checkNotNull(nodeVersion);
this.subtreeVersion = Preconditions.checkNotNull(subtreeVersion);
@@
-50,11
+49,6
@@
class StoreMetadataNode implements Immutable, Identifiable<PathArgument>, StoreT
Collections.<PathArgument, StoreMetadataNode>emptyMap());
}
Collections.<PathArgument, StoreMetadataNode>emptyMap());
}
- public StoreMetadataNode(final NormalizedNode<?, ?> data, final UnsignedLong nodeVersion,
- final UnsignedLong subtreeVersion) {
- this(data, nodeVersion, subtreeVersion, Collections.<PathArgument, StoreMetadataNode>emptyMap());
- }
-
public static Builder builder() {
return new Builder();
}
public static Builder builder() {
return new Builder();
}
@@
-80,8
+74,7
@@
class StoreMetadataNode implements Immutable, Identifiable<PathArgument>, StoreT
return this.data;
}
return this.data;
}
- @Override
- public Optional<StoreMetadataNode> getChild(final PathArgument key) {
+ Optional<StoreMetadataNode> getChild(final PathArgument key) {
return Optional.fromNullable(children.get(key));
}
return Optional.fromNullable(children.get(key));
}
@@
-134,7
+127,7
@@
class StoreMetadataNode implements Immutable, Identifiable<PathArgument>, StoreT
children = new HashMap<>();
}
children = new HashMap<>();
}
- p
ublic
Builder(StoreMetadataNode node) {
+ p
rivate
Builder(StoreMetadataNode node) {
children = new HashMap<>(node.children);
}
children = new HashMap<>(node.children);
}