Sho SHIMIZU
Committed by Thomas Vachuska

Reformat code

Change-Id: Icde0d7e8806f59da99082089a83dda26b23d12a8
......@@ -542,14 +542,11 @@ public class FlowRuleManager
request.ops().forEach(
op -> {
switch (op.operator()) {
case ADD:
post(new FlowRuleEvent(RULE_ADD_REQUESTED,
op.target()));
post(new FlowRuleEvent(RULE_ADD_REQUESTED, op.target()));
break;
case REMOVE:
post(new FlowRuleEvent(RULE_REMOVE_REQUESTED,
op.target()));
post(new FlowRuleEvent(RULE_REMOVE_REQUESTED, op.target()));
break;
case MODIFY:
//TODO: do something here when the time comes.
......@@ -561,10 +558,7 @@ public class FlowRuleManager
);
DeviceId deviceId = event.deviceId();
FlowRuleBatchOperation batchOperation =
request.asBatchOperation(deviceId);
FlowRuleBatchOperation batchOperation = request.asBatchOperation(deviceId);
FlowRuleProvider flowRuleProvider = getProvider(deviceId);
if (flowRuleProvider != null) {
flowRuleProvider.executeBatch(batchOperation);
......@@ -630,8 +624,7 @@ public class FlowRuleManager
}
private void process(Set<FlowRuleOperation> ops) {
Multimap<DeviceId, FlowRuleBatchEntry> perDeviceBatches =
ArrayListMultimap.create();
Multimap<DeviceId, FlowRuleBatchEntry> perDeviceBatches = ArrayListMultimap.create();
for (FlowRuleOperation flowRuleOperation : ops) {
FlowRuleBatchEntry fbe =
......@@ -640,7 +633,6 @@ public class FlowRuleManager
perDeviceBatches.put(flowRuleOperation.rule().deviceId(), fbe);
}
for (DeviceId deviceId : perDeviceBatches.keySet()) {
long id = idGenerator.getNewId();
final FlowRuleBatchOperation b = new FlowRuleBatchOperation(perDeviceBatches.get(deviceId),
......@@ -657,8 +649,6 @@ public class FlowRuleManager
}
}
synchronized void fail(DeviceId devId, Set<? extends FlowRule> failures) {
hasFailed = true;
pendingDevices.remove(devId);
......@@ -674,7 +664,6 @@ public class FlowRuleManager
context.onError(failedOpsBuilder.build());
}
}
}
@Override
......