Refactored code to consolidate functionality in Database* classes.
Renamed few methods and variables to align with local convention and also to match the description of functionality.
Change-Id: Ib17e73079534c76f76bcb01f14b6496e62275dbd
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/SimpleTableHashPartitioner.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/SimpleTableHashPartitioner.java
index e8daeff..8dc26e0 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/SimpleTableHashPartitioner.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/SimpleTableHashPartitioner.java
@@ -19,11 +19,11 @@
import java.util.List;
/**
- * A simple Partitioner that uses the table name hash to
+ * A simple Partitioner that uses the map name hash to
* pick a partition.
* <p>
- * This class uses a md5 hash based hashing scheme for hashing the table name to
- * a partition. This partitioner maps all keys for a table to the same database
+ * This class uses a md5 hash based hashing scheme for hashing the map name to
+ * a partition. This partitioner maps all keys for a map to the same database
* partition.
*/
public class SimpleTableHashPartitioner extends DatabasePartitioner {
@@ -33,7 +33,7 @@
}
@Override
- public Database getPartition(String tableName, String key) {
- return partitions.get(hash(tableName) % partitions.size());
+ public Database getPartition(String mapName, String key) {
+ return partitions.get(hash(mapName) % partitions.size());
}
}