diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentResourceStore.java
index dd78e50..3aa07f4 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentResourceStore.java
@@ -74,7 +74,7 @@
             .register(KryoNamespaces.API)
             .register(UnifiedDiscreteResources.class)
             .register(new EncodableDiscreteResourcesSerializer(), EncodableDiscreteResources.class)
-            .register(NonEncodableDiscreteResources.class)
+            .register(GenericDiscreteResources.class)
             .register(EmptyDiscreteResources.class)
             .register(ContinuousResourceAllocation.class)
             .build());
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/NonEncodableDiscreteResources.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/GenericDiscreteResources.java
similarity index 85%
rename from core/store/dist/src/main/java/org/onosproject/store/resource/impl/NonEncodableDiscreteResources.java
rename to core/store/dist/src/main/java/org/onosproject/store/resource/impl/GenericDiscreteResources.java
index 333a40b..161f1ff 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/NonEncodableDiscreteResources.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/GenericDiscreteResources.java
@@ -27,7 +27,7 @@
 import java.util.Optional;
 import java.util.Set;
 
-final class NonEncodableDiscreteResources implements DiscreteResources {
+final class GenericDiscreteResources implements DiscreteResources {
     private final Set<DiscreteResource> values;
 
     static DiscreteResources of(Set<DiscreteResource> resources) {
@@ -35,15 +35,15 @@
             return DiscreteResources.empty();
         }
 
-        return new NonEncodableDiscreteResources(resources);
+        return new GenericDiscreteResources(resources);
     }
 
-    private NonEncodableDiscreteResources(Set<DiscreteResource> values) {
+    private GenericDiscreteResources(Set<DiscreteResource> values) {
         this.values = values;
     }
 
     // for serializer
-    private NonEncodableDiscreteResources() {
+    private GenericDiscreteResources() {
         this.values = null;
     }
 
@@ -59,7 +59,7 @@
 
     @Override
     public DiscreteResources difference(DiscreteResources other) {
-        return new NonEncodableDiscreteResources(Sets.difference(this.values, other.values()));
+        return new GenericDiscreteResources(Sets.difference(this.values, other.values()));
     }
 
     @Override
@@ -77,7 +77,7 @@
     public DiscreteResources add(DiscreteResources other) {
         Set<DiscreteResource> newValues = new LinkedHashSet<>(this.values);
         newValues.addAll(other.values());
-        return new NonEncodableDiscreteResources(newValues);
+        return new GenericDiscreteResources(newValues);
     }
 
     // returns a new instance, not mutate the current instance
@@ -85,7 +85,7 @@
     public DiscreteResources remove(List<DiscreteResource> removed) {
         Set<DiscreteResource> newValues = new LinkedHashSet<>(this.values);
         newValues.removeAll(removed);
-        return new NonEncodableDiscreteResources(newValues);
+        return new GenericDiscreteResources(newValues);
     }
 
     @Override
@@ -108,7 +108,7 @@
         if (obj == null || getClass() != obj.getClass()) {
             return false;
         }
-        final NonEncodableDiscreteResources other = (NonEncodableDiscreteResources) obj;
+        final GenericDiscreteResources other = (GenericDiscreteResources) obj;
         return Objects.equals(this.values, other.values);
     }
 
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/UnifiedDiscreteResources.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/UnifiedDiscreteResources.java
index 1b4ded4..7b15a0a 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/UnifiedDiscreteResources.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/UnifiedDiscreteResources.java
@@ -33,7 +33,7 @@
  * and those that can't encoded as integer.
  */
 final class UnifiedDiscreteResources implements DiscreteResources {
-    private final DiscreteResources nonEncodables;
+    private final DiscreteResources generics;
     private final DiscreteResources encodables;
     private static final Codecs CODECS = Codecs.getInstance();
 
@@ -45,13 +45,13 @@
         Map<Boolean, Set<DiscreteResource>> partitioned = resources.stream()
                 .collect(Collectors.partitioningBy(CODECS::isEncodable, Collectors.toCollection(LinkedHashSet::new)));
         return new UnifiedDiscreteResources(
-                NonEncodableDiscreteResources.of(partitioned.get(false)),
+                GenericDiscreteResources.of(partitioned.get(false)),
                 EncodableDiscreteResources.of(partitioned.get(true))
         );
     }
 
-    private UnifiedDiscreteResources(DiscreteResources nonEncodables, DiscreteResources encodables) {
-        this.nonEncodables = nonEncodables;
+    private UnifiedDiscreteResources(DiscreteResources generics, DiscreteResources encodables) {
+        this.generics = generics;
         this.encodables = encodables;
     }
 
@@ -61,7 +61,7 @@
             return encodables.lookup(id);
         }
 
-        return nonEncodables.lookup(id);
+        return generics.lookup(id);
     }
 
     @Override
@@ -71,14 +71,14 @@
 
     @Override
     public boolean isEmpty() {
-        return nonEncodables.isEmpty() && encodables.isEmpty();
+        return generics.isEmpty() && encodables.isEmpty();
     }
 
     @Override
     public boolean containsAny(List<DiscreteResource> other) {
         Map<Boolean, List<DiscreteResource>> partitioned = other.stream()
                 .collect(Collectors.partitioningBy(CODECS::isEncodable));
-        return nonEncodables.containsAny(partitioned.get(false)) || encodables.containsAny(partitioned.get(true));
+        return generics.containsAny(partitioned.get(false)) || encodables.containsAny(partitioned.get(true));
     }
 
     @Override
@@ -93,7 +93,7 @@
 
     @Override
     public Set<DiscreteResource> values() {
-        return Stream.concat(encodables.values().stream(), nonEncodables.values().stream())
+        return Stream.concat(encodables.values().stream(), generics.values().stream())
                 .collect(Collectors.toCollection(LinkedHashSet::new));
     }
 }
