diff --git a/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
index defc955..b5aa160 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/newresource/impl/ConsistentResourceStore.java
@@ -472,12 +472,11 @@
      * @param map map holding multiple values for a key
      * @param key key specifying values
      * @param values values to be appended
-     * @param <K> type of the key
-     * @param <V> type of the element of the list
      * @return true if the operation succeeds, false otherwise.
      */
-    private <K, V> boolean appendValues(TransactionalMap<K, Set<V>> map, K key, List<V> values) {
-        Set<V> oldValues = map.putIfAbsent(key, new LinkedHashSet<>(values));
+    private boolean appendValues(TransactionalMap<DiscreteResource, Set<Resource>> map,
+                                 DiscreteResource key, List<Resource> values) {
+        Set<Resource> oldValues = map.putIfAbsent(key, new LinkedHashSet<>(values));
         if (oldValues == null) {
             return true;
         }
@@ -487,7 +486,7 @@
             return true;
         }
 
-        LinkedHashSet<V> newValues = new LinkedHashSet<>(oldValues);
+        LinkedHashSet<Resource> newValues = new LinkedHashSet<>(oldValues);
         newValues.addAll(values);
         return map.replace(key, oldValues, newValues);
     }
@@ -499,12 +498,11 @@
      * @param map map holding multiple values for a key
      * @param key key specifying values
      * @param values values to be removed
-     * @param <K> type of the key
-     * @param <V> type of the element of the list
      * @return true if the operation succeeds, false otherwise
      */
-    private <K, V> boolean removeValues(TransactionalMap<K, Set<V>> map, K key, List<? extends V> values) {
-        Set<V> oldValues = map.putIfAbsent(key, new LinkedHashSet<>());
+    private boolean removeValues(TransactionalMap<DiscreteResource, Set<Resource>> map,
+                                 DiscreteResource key, List<Resource> values) {
+        Set<Resource> oldValues = map.putIfAbsent(key, new LinkedHashSet<>());
         if (oldValues == null) {
             log.trace("No-Op removing values. key {} did not exist", key);
             return true;
@@ -516,7 +514,7 @@
             return true;
         }
 
-        LinkedHashSet<V> newValues = new LinkedHashSet<>(oldValues);
+        LinkedHashSet<Resource> newValues = new LinkedHashSet<>(oldValues);
         newValues.removeAll(values);
         return map.replace(key, oldValues, newValues);
     }
