import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.MoreExecutors;
-
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
writeOpStatus.set(FlowCounter.OperationStatus.IN_PROGRESS.status());
Short tableId = startTableId;
- Integer sourceIp = 1;
WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
short calculatedTableId = tableId;
+ int sourceIp = 1;
for (; sourceIp <= batchSize; sourceIp++) {
String flowId = "Flow-" + dpId + "." + calculatedTableId + "." + sourceIp;
LOG.debug("Adding flow with id: {}", flowId);
}
}
- private class DsCallBack implements FutureCallback {
+ private class DsCallBack implements FutureCallback<Void> {
private final String dpId;
- private Integer sourceIp;
+ private int sourceIp;
private final Short tableId;
- DsCallBack(String dpId, Integer sourceIp, Short tableId) {
+ DsCallBack(String dpId, int sourceIp, Short tableId) {
this.dpId = dpId;
this.sourceIp = sourceIp;
short numberA = 1;
}
@Override
- public void onSuccess(Object object) {
+ public void onSuccess(Void notUsed) {
if (sourceIp > flowsPerDpn) {
long dur = System.nanoTime() - startTime;
LOG.info("Completed all flows installation for: dpid: {}, tableId: {}, sourceIp: {} in {}ns", dpId,