Enable checkstyle rule to verify method names
Enabled checkstyle rule "MethodName" which checks
if method names adhere to a naming convention and
fixed the violations it found.
Change-Id: I87448a1fa857e78f33c42090d485bf21a8986ba7
diff --git a/src/main/java/net/onrc/onos/core/datastore/IKVClient.java b/src/main/java/net/onrc/onos/core/datastore/IKVClient.java
index 0fa1cbd..c2d9e35 100644
--- a/src/main/java/net/onrc/onos/core/datastore/IKVClient.java
+++ b/src/main/java/net/onrc/onos/core/datastore/IKVClient.java
@@ -161,6 +161,6 @@
* Version number which represents that the object does not exist, or has
* never been read the DB before.
*/
- public long VERSION_NONEXISTENT();
+ public long getVersionNonexistant();
}
diff --git a/src/main/java/net/onrc/onos/core/datastore/IKVTable.java b/src/main/java/net/onrc/onos/core/datastore/IKVTable.java
index 87fee25..9d0c8ee 100644
--- a/src/main/java/net/onrc/onos/core/datastore/IKVTable.java
+++ b/src/main/java/net/onrc/onos/core/datastore/IKVTable.java
@@ -10,7 +10,7 @@
* Version number which represents that the object does not exist, or has
* never been read the DB before.
*/
- public long VERSION_NONEXISTENT();
+ public long getVersionNonexistant();
/**
* Interface for a class to represent an entry in Table.
@@ -98,7 +98,7 @@
* Remove a Key-Value entry in table.
*
* @param key
- * @return version of removed object or VERSION_NONEXISTENT, if it did not exist.
+ * @return version of removed object or non existant version if it did not exist.
*/
public long forceDelete(byte[] key);
diff --git a/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZClient.java b/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZClient.java
index 32ff15b..3bfe157 100644
--- a/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZClient.java
+++ b/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZClient.java
@@ -335,7 +335,7 @@
}
@Override
- public long VERSION_NONEXISTENT() {
+ public long getVersionNonexistant() {
return VERSION_NONEXISTENT;
}
diff --git a/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZTable.java b/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZTable.java
index 7b97ec0..20501bb 100644
--- a/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZTable.java
+++ b/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZTable.java
@@ -43,7 +43,7 @@
}
/**
- * increment version, avoiding VERSION_NONEXISTENT.
+ * increment version, avoiding versionNonexistant.
*
* @param version
* @return
@@ -320,7 +320,7 @@
}
@Override
- public long VERSION_NONEXISTENT() {
+ public long getVersionNonexistant() {
return HZClient.VERSION_NONEXISTENT;
}
}
diff --git a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCClient.java b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCClient.java
index d2e1670..3644cfa 100644
--- a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCClient.java
+++ b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCClient.java
@@ -566,7 +566,7 @@
static final long VERSION_NONEXISTENT = JRamCloud.VERSION_NONEXISTENT;
@Override
- public long VERSION_NONEXISTENT() {
+ public long getVersionNonexistant() {
return VERSION_NONEXISTENT;
}
}
diff --git a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCTable.java b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCTable.java
index f7bafd5..3c78cf1 100644
--- a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCTable.java
+++ b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCTable.java
@@ -127,7 +127,7 @@
}
@Override
- public long VERSION_NONEXISTENT() {
+ public long getVersionNonexistant() {
return RCClient.VERSION_NONEXISTENT;
}
diff --git a/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java b/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
index 568cfc7..618c31e 100644
--- a/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
+++ b/src/main/java/net/onrc/onos/core/datastore/utils/KVObject.java
@@ -49,7 +49,7 @@
/**
* serialized value version stored on data store or
- * {@link IKVTable.VERSION_NONEXISTENT()} if is a new object.
+ * {@link IKVTable.getVersionNonexistant()} if is a new object.
*/
private long version;
@@ -59,7 +59,7 @@
private Map<Object, Object> propertyMap;
public KVObject(final IKVTable table, final byte[] key) {
- this(table, key, null, table.VERSION_NONEXISTENT());
+ this(table, key, null, table.getVersionNonexistant());
}
public KVObject(final IKVTable table, final byte[] key, final byte[] value, final long version) {
@@ -324,7 +324,7 @@
}
} else {
log.error("MultiRead error, skipping {}, {}", obj.getTable(), obj);
- obj.version = obj.getTable().VERSION_NONEXISTENT();
+ obj.version = obj.getTable().getVersionNonexistant();
failExists = true;
}
}