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/DefaultTransactionalMap.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultTransactionalMap.java
index 91151b0..ade7033 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultTransactionalMap.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultTransactionalMap.java
@@ -164,7 +164,7 @@
Versioned<V> original = readCache.get(key);
if (original != null) {
updates.add(DatabaseUpdate.newBuilder()
- .withTableName(name)
+ .withMapName(name)
.withType(DatabaseUpdate.Type.REMOVE_IF_VERSION_MATCH)
.withKey(keyCache.getUnchecked(key))
.withCurrentVersion(original.version())
@@ -175,14 +175,14 @@
Versioned<V> original = readCache.get(key);
if (original == null) {
updates.add(DatabaseUpdate.newBuilder()
- .withTableName(name)
+ .withMapName(name)
.withType(DatabaseUpdate.Type.PUT_IF_ABSENT)
.withKey(keyCache.getUnchecked(key))
.withValue(serializer.encode(value))
.build());
} else {
updates.add(DatabaseUpdate.newBuilder()
- .withTableName(name)
+ .withMapName(name)
.withType(DatabaseUpdate.Type.PUT_IF_VERSION_MATCH)
.withKey(keyCache.getUnchecked(key))
.withCurrentVersion(original.version())