Enable checkstyle rules to check names of static final members
Enable the rule that mandates use of uppercase and underscores
in the names of static final members.
Change-Id: Ica7f004601f9efd14d4b6a4450189a6eb8967f72
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PersistIntent.java b/src/main/java/net/onrc/onos/core/intent/runtime/PersistIntent.java
index e8c5dfc..ba845ed 100755
--- a/src/main/java/net/onrc/onos/core/intent/runtime/PersistIntent.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/PersistIntent.java
@@ -35,8 +35,8 @@
private long range = 10000L;
private final IControllerRegistryService controllerRegistry;
NetworkGraph graph = null;
- private final static String intentJournal = "G:IntentJournal";
- private final static int valueStoreLimit = 1024 * 1024;
+ private final static String INTENT_JOURNAL = "G:IntentJournal";
+ private final static int VALUE_STORE_LIMIT = 1024 * 1024;
private IKVTable table;
private Kryo kryo;
private ByteArrayOutputStream stream;
@@ -49,7 +49,7 @@
public PersistIntent(final IControllerRegistryService controllerRegistry, INetworkGraphService ng) {
this.controllerRegistry = controllerRegistry;
this.graph = ng.getNetworkGraph();
- table = DataStoreClient.getClient().getTable(intentJournal);
+ table = DataStoreClient.getClient().getTable(INTENT_JOURNAL);
stream = new ByteArrayOutputStream(1024);
output = new Output(stream);
kryo = (new KryoFactory()).newKryo();
@@ -89,17 +89,17 @@
ByteBuffer keyBytes = ByteBuffer.allocate(8).putLong(key);
byte[] buffer = stream.toByteArray();
int total = buffer.length;
- if ((total >= valueStoreLimit)) {
- int writeCount = total / valueStoreLimit;
- int remainder = total % valueStoreLimit;
+ if ((total >= VALUE_STORE_LIMIT)) {
+ int writeCount = total / VALUE_STORE_LIMIT;
+ int remainder = total % VALUE_STORE_LIMIT;
int upperIndex = 0;
for (int i = 0; i < writeCount; i++, key++) {
keyBytes.clear();
keyBytes.putLong(key);
keyBytes.flip();
- upperIndex = (i * valueStoreLimit + valueStoreLimit) - 1;
- log.debug("writing using indexes {}:{}", (i * valueStoreLimit), upperIndex);
- table.create(keyBytes.array(), Arrays.copyOfRange(buffer, i * valueStoreLimit, upperIndex));
+ upperIndex = (i * VALUE_STORE_LIMIT + VALUE_STORE_LIMIT) - 1;
+ log.debug("writing using indexes {}:{}", (i * VALUE_STORE_LIMIT), upperIndex);
+ table.create(keyBytes.array(), Arrays.copyOfRange(buffer, i * VALUE_STORE_LIMIT, upperIndex));
}
if (remainder > 0) {
keyBytes.clear();