BUG-509: remove StoreUtils.initialChangeEvent() 14/7014/1
authorRobert Varga <rovarga@cisco.com>
Thu, 15 May 2014 08:56:48 +0000 (10:56 +0200)
committerRobert Varga <rovarga@cisco.com>
Thu, 15 May 2014 08:57:46 +0000 (10:57 +0200)
This method is unused. Remove it, such that StoreUtils are now
completely independent of org.opendaylight.controller.md.sal, making
them a candidate for move to yang-data-*.

Change-Id: Idf945aee6fd4a80f8ca58fc50bcc997880a60ec0
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/StoreUtils.java

index c2ca1b4..e1da9a7 100644 (file)
@@ -7,12 +7,8 @@
  */
 package org.opendaylight.controller.md.sal.dom.store.impl;
 
-import java.util.Collections;
-import java.util.Map;
 import java.util.Set;
 
-import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
-import org.opendaylight.controller.md.sal.dom.store.impl.tree.StoreMetadataNode;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.AugmentationIdentifier;
@@ -25,7 +21,6 @@ import com.google.common.base.Function;
 import com.google.common.base.Strings;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
 import com.google.common.primitives.UnsignedLong;
 
 public final class StoreUtils {
@@ -42,20 +37,6 @@ public final class StoreUtils {
         throw new UnsupportedOperationException("Utility class should not be instantiated");
     }
 
-    public static final UnsignedLong increase(final UnsignedLong original) {
-        return original.plus(UnsignedLong.ONE);
-    }
-
-    public static final InstanceIdentifier append(final InstanceIdentifier parent, final PathArgument arg) {
-
-        return new InstanceIdentifier(ImmutableList.<PathArgument> builder().addAll(parent.getPath()).add(arg).build());
-    }
-
-    public static AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> initialChangeEvent(
-            final InstanceIdentifier path, final StoreMetadataNode data) {
-        return new InitialDataChangeEvent(path, data.getData());
-    }
-
     /*
      * Suppressing warnings here allows us to fool the compiler enough
      * such that we can reuse a single function for all applicable types
@@ -66,46 +47,12 @@ public final class StoreUtils {
         return (Function) EXTRACT_IDENTIFIER;
     }
 
-    private static final class InitialDataChangeEvent implements
-            AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> {
-
-        private final ImmutableMap<InstanceIdentifier, NormalizedNode<?, ?>> payload;
-        private final NormalizedNode<?, ?> data;
-
-        public InitialDataChangeEvent(final InstanceIdentifier path, final NormalizedNode<?, ?> data) {
-            payload = ImmutableMap.<InstanceIdentifier, NormalizedNode<?, ?>> of(path, data);
-            this.data = data;
-        }
-
-        @Override
-        public Map<InstanceIdentifier, NormalizedNode<?, ?>> getCreatedData() {
-            return payload;
-        }
-
-        @Override
-        public Map<InstanceIdentifier, ? extends NormalizedNode<?, ?>> getOriginalData() {
-            return Collections.emptyMap();
-        }
-
-        @Override
-        public NormalizedNode<?, ?> getOriginalSubtree() {
-            return null;
-        }
-
-        @Override
-        public Set<InstanceIdentifier> getRemovedPaths() {
-            return Collections.emptySet();
-        }
-
-        @Override
-        public Map<InstanceIdentifier, NormalizedNode<?, ?>> getUpdatedData() {
-            return payload;
-        }
+    public static final UnsignedLong increase(final UnsignedLong original) {
+        return original.plus(UnsignedLong.ONE);
+    }
 
-        @Override
-        public NormalizedNode<?, ?> getUpdatedSubtree() {
-            return data;
-        }
+    public static final InstanceIdentifier append(final InstanceIdentifier parent, final PathArgument arg) {
+        return new InstanceIdentifier(ImmutableList.<PathArgument> builder().addAll(parent.getPath()).add(arg).build());
     }
 
     public static <V> Set<V> toIdentifierSet(final Iterable<? extends Identifiable<V>> children) {