Enforced Checkstyle rule to limit line length.
Maximum line length is 120 right now (but we might want to think about
reducing it further in the future).
I've fixed the existing lines we had that violated the rule.
Change-Id: I077d0c427d35e1c5033aab45ed3fbbbf1d106e89
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 a59a8a9..2a7d4f5 100644
--- a/src/main/java/net/onrc/onos/core/datastore/IKVClient.java
+++ b/src/main/java/net/onrc/onos/core/datastore/IKVClient.java
@@ -163,7 +163,8 @@
* @param initialValue
* @throws ObjectExistsException
*/
- public void createCounter(final IKVTableID tableId, final byte[] key, final long initialValue) throws ObjectExistsException;
+ public void createCounter(final IKVTableID tableId, final byte[] key,
+ final long initialValue) throws ObjectExistsException;
/**
* Set atomic 64bit integer counter in data store to specified value.
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 8c34cac..796976e 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
@@ -43,14 +43,17 @@
private static final String MAP_PREFIX = "datastore://";
- private static final String BASE_CONFIG_FILENAME = System.getProperty("net.onrc.onos.core.datastore.hazelcast.baseConfig", "conf/hazelcast.xml");
+ private static final String BASE_CONFIG_FILENAME =
+ System.getProperty("net.onrc.onos.core.datastore.hazelcast.baseConfig", "conf/hazelcast.xml");
private static final String HAZELCAST_DEFAULT_XML = "conf/hazelcast.default.xml";
// XXX Remove this mode at some point
- private static boolean useClientMode = Boolean.parseBoolean(System.getProperty("net.onrc.onos.core.datastore.hazelcast.clientMode", "true"));
+ private static boolean useClientMode = Boolean.parseBoolean(
+ System.getProperty("net.onrc.onos.core.datastore.hazelcast.clientMode", "true"));
// Note: xml configuration will overwrite this value if present
- private static int backupCount = Integer.parseInt(System.getProperty("net.onrc.onos.core.datastore.hazelcast.backupCount", "3"));
+ private static int backupCount = Integer.parseInt(
+ System.getProperty("net.onrc.onos.core.datastore.hazelcast.backupCount", "3"));
private final HazelcastInstance hazelcastInstance;
@@ -279,7 +282,8 @@
@Override
public IMultiEntryOperation forceCreateOp(final IKVTableID tableId, final byte[] key,
final byte[] value) {
- return new HZMultiEntryOperation((HZTable) tableId, key, value, HZClient.VERSION_NONEXISTENT, OPERATION.FORCE_CREATE);
+ return new HZMultiEntryOperation((HZTable) tableId, key, value,
+ HZClient.VERSION_NONEXISTENT, OPERATION.FORCE_CREATE);
}
@Override
diff --git a/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZMultiEntryOperation.java b/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZMultiEntryOperation.java
index 58df13b..270d1a7 100644
--- a/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZMultiEntryOperation.java
+++ b/src/main/java/net/onrc/onos/core/datastore/hazelcast/HZMultiEntryOperation.java
@@ -52,7 +52,8 @@
* @param version
* @param operation
*/
- public HZMultiEntryOperation(final HZTable table, final byte[] key, final byte[] value, final long version, final OPERATION operation) {
+ public HZMultiEntryOperation(final HZTable table, final byte[] key,
+ final byte[] value, final long version, final OPERATION operation) {
this.table = table;
this.key = key.clone();
this.status = STATUS.NOT_EXECUTED;
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 687b6dd..17538f0 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
@@ -498,11 +498,15 @@
op.entry.setVersion(removedVersion);
op.status = STATUS.SUCCESS;
} catch (JRamCloud.ObjectDoesntExistException | JRamCloud.WrongVersionException e) {
- log.error("Failed to remove key:" + ByteArrayUtil.toHexStringBuilder(op.entry.getKey(), "") + " from tableID:" + op.tableId, e);
+ log.error("Failed to remove key:" +
+ ByteArrayUtil.toHexStringBuilder(op.entry.getKey(), "") +
+ " from tableID:" + op.tableId, e);
failExists = true;
op.status = STATUS.FAILED;
} catch (JRamCloud.RejectRulesException e) {
- log.error("Failed to remove key:" + ByteArrayUtil.toHexStringBuilder(op.entry.getKey(), "") + " from tableID:" + op.tableId, e);
+ log.error("Failed to remove key:" +
+ ByteArrayUtil.toHexStringBuilder(op.entry.getKey(), "") +
+ " from tableID:" + op.tableId, e);
failExists = true;
op.status = STATUS.FAILED;
}
@@ -514,7 +518,9 @@
op.entry.setVersion(removedVersion);
op.status = STATUS.SUCCESS;
} else {
- log.error("Failed to remove key:{} from tableID:{}", ByteArrayUtil.toHexStringBuilder(op.entry.getKey(), ""), op.tableId);
+ log.error("Failed to remove key:{} from tableID:{}",
+ ByteArrayUtil.toHexStringBuilder(op.entry.getKey(), ""),
+ op.tableId);
failExists = true;
op.status = STATUS.FAILED;
}
@@ -545,9 +551,11 @@
}
// execute
- JRamCloud.Object[] results = rcClient.multiRead(multiReadObjects.tableId, multiReadObjects.key, multiReadObjects.keyLength, reqs);
+ JRamCloud.Object[] results = rcClient.multiRead(multiReadObjects.tableId,
+ multiReadObjects.key, multiReadObjects.keyLength, reqs);
if (results.length != reqs) {
- log.error("multiRead returned unexpected number of results. (requested:{}, returned:{})", reqs, results.length);
+ log.error("multiRead returned unexpected number of results. " +
+ "(requested:{}, returned:{})", reqs, results.length);
failExists = true;
}
@@ -605,12 +613,18 @@
op.setStatus(STATUS.FAILED);
return failExists;
}
- multiWriteObjects.setObject(i, ((RCTableID) op.getTableId()).getTableID(), op.getKey(), op.getValue(), rules);
+ multiWriteObjects.setObject(i,
+ ((RCTableID) op.getTableId()).getTableID(), op.getKey(),
+ op.getValue(), rules);
}
- MultiWriteRspObject[] results = rcClient.multiWrite(multiWriteObjects.tableId, multiWriteObjects.key, multiWriteObjects.keyLength, multiWriteObjects.value, multiWriteObjects.valueLength, ops.size(), multiWriteObjects.rules);
+ MultiWriteRspObject[] results = rcClient.multiWrite(multiWriteObjects.tableId,
+ multiWriteObjects.key, multiWriteObjects.keyLength,
+ multiWriteObjects.value, multiWriteObjects.valueLength, ops.size(),
+ multiWriteObjects.rules);
if (results.length != reqs) {
- log.error("multiWrite returned unexpected number of results. (requested:{}, returned:{})", reqs, results.length);
+ log.error("multiWrite returned unexpected number of results. " +
+ "(requested:{}, returned:{})", reqs, results.length);
failExists = true;
}
@@ -630,7 +644,8 @@
return failExists;
}
- private static final ConcurrentHashMap<String, RCTable> TABLES = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap<String, RCTable> TABLES =
+ new ConcurrentHashMap<>();
@Override
public IKVTable getTable(final String tableName) {
diff --git a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCMultiEntryOperation.java b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCMultiEntryOperation.java
index 9893838..b061f8d 100644
--- a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCMultiEntryOperation.java
+++ b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCMultiEntryOperation.java
@@ -73,11 +73,13 @@
}
public static IMultiEntryOperation create(final IKVTableID tableId, final byte[] key, final byte[] value) {
- return new RCMultiEntryOperation(tableId, new Entry(key, value, RCClient.VERSION_NONEXISTENT), OPERATION.CREATE);
+ return new RCMultiEntryOperation(tableId,
+ new Entry(key, value, RCClient.VERSION_NONEXISTENT), OPERATION.CREATE);
}
public static IMultiEntryOperation forceCreate(final IKVTableID tableId, final byte[] key, final byte[] value) {
- return new RCMultiEntryOperation(tableId, new Entry(key, value, RCClient.VERSION_NONEXISTENT), OPERATION.FORCE_CREATE);
+ return new RCMultiEntryOperation(tableId,
+ new Entry(key, value, RCClient.VERSION_NONEXISTENT), OPERATION.FORCE_CREATE);
}
/**
@@ -90,11 +92,13 @@
return new RCMultiEntryOperation(tableId, new Entry(key), OPERATION.READ);
}
- public static IMultiEntryOperation update(final IKVTableID tableId, final byte[] key, final byte[] value, final long version) {
+ public static IMultiEntryOperation update(final IKVTableID tableId,
+ final byte[] key, final byte[] value, final long version) {
return new RCMultiEntryOperation(tableId, new Entry(key, value, version), OPERATION.UPDATE);
}
- public static IMultiEntryOperation delete(final IKVTableID tableId, final byte[] key, final byte[] value, final long version) {
+ public static IMultiEntryOperation delete(final IKVTableID tableId,
+ final byte[] key, final byte[] value, final long version) {
return new RCMultiEntryOperation(tableId, new Entry(key, value, version), OPERATION.DELETE);
}