X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FShardedDOMDataTree.java;h=638e58553583dda2b476252777b533d975862591;hp=11eae5d8334ef2e91d0be9baa0c5e25f79e8fc14;hb=908a421ebb9f54b3b268082ac562dded5cf51b87;hpb=64db87e8fb5de25e68ba824ec2eaa17e3f217c96 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/ShardedDOMDataTree.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/ShardedDOMDataTree.java index 11eae5d833..638e585535 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/ShardedDOMDataTree.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/ShardedDOMDataTree.java @@ -95,12 +95,12 @@ public final class ShardedDOMDataTree implements DOMDataTreeService, DOMDataTree final ShardingTableEntry parent = lookupShard(prefix); parentReg = parent.getRegistration(); if (parentReg != null && prefix.equals(parentReg.getPrefix())) { - throw new DOMDataTreeShardingConflictException(String.format("Prefix %s is already occupied by shard {}", prefix, parentReg.getInstance())); + throw new DOMDataTreeShardingConflictException(String.format("Prefix %s is already occupied by shard %s", prefix, parentReg.getInstance())); } // FIXME: wrap the shard in a proper adaptor based on implemented interface - reg = new ShardRegistration(this, prefix, shard); + reg = new ShardRegistration<>(this, prefix, shard); storeShard(prefix, reg); @@ -117,7 +117,7 @@ public final class ShardedDOMDataTree implements DOMDataTreeService, DOMDataTree @GuardedBy("this") private DOMDataTreeProducer findProducer(final DOMDataTreeIdentifier subtree) { - for (Entry e : idToProducer.entrySet()) { + for (final Entry e : idToProducer.entrySet()) { if (e.getKey().contains(subtree)) { return e.getValue(); } @@ -127,10 +127,10 @@ public final class ShardedDOMDataTree implements DOMDataTreeService, DOMDataTree } synchronized void destroyProducer(final ShardedDOMDataTreeProducer producer) { - for (DOMDataTreeIdentifier s : producer.getSubtrees()) { - DOMDataTreeProducer r = idToProducer.remove(s); + for (final DOMDataTreeIdentifier s : producer.getSubtrees()) { + final DOMDataTreeProducer r = idToProducer.remove(s); if (!producer.equals(r)) { - LOG.error("Removed producer %s on subtree %s while removing %s", r, s, producer); + LOG.error("Removed producer {} on subtree {} while removing {}", r, s, producer); } } } @@ -151,7 +151,7 @@ public final class ShardedDOMDataTree implements DOMDataTreeService, DOMDataTree Preconditions.checkArgument(!subtrees.isEmpty(), "Subtrees may not be empty"); final Map shardMap = new HashMap<>(); - for (DOMDataTreeIdentifier s : subtrees) { + for (final DOMDataTreeIdentifier s : subtrees) { // Attempting to create a disconnected producer -- all subtrees have to be unclaimed final DOMDataTreeProducer producer = findProducer(s); Preconditions.checkArgument(producer == null, "Subtree %s is attached to producer %s", s, producer); @@ -166,7 +166,7 @@ public final class ShardedDOMDataTree implements DOMDataTreeService, DOMDataTree Preconditions.checkNotNull(parent); final Map shardMap = new HashMap<>(); - for (DOMDataTreeIdentifier s : subtrees) { + for (final DOMDataTreeIdentifier s : subtrees) { shardMap.put(s, lookupShard(s).getRegistration().getInstance()); } @@ -175,7 +175,7 @@ public final class ShardedDOMDataTree implements DOMDataTreeService, DOMDataTree @Override public synchronized ListenerRegistration registerListener(final T listener, final Collection subtrees, final boolean allowRxMerges, final Collection producers) { - // TODO Auto-generated method stub - return null; + // FIXME Implement this. + throw new UnsupportedOperationException("Not implemented yet."); } }