Minor API cleanup: remove an argument that is not needed in some of the
FlowDatabaseOperation class methods.
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
index 71479a1..fd98278 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
@@ -31,14 +31,12 @@
/**
* Add a flow.
*
- * @param flowManager the Flow Manager to use.
* @param dbHandler the Graph Database handler to use.
* @param flowPath the Flow Path to install.
* @param flowId the return-by-reference Flow ID as assigned internally.
* @return true on success, otherwise false.
*/
- static boolean addFlow(FlowManager flowManager,
- GraphDBOperation dbHandler,
+ static boolean addFlow(GraphDBOperation dbHandler,
FlowPath flowPath, FlowId flowId) {
IFlowPath flowObj = null;
boolean found = false;
@@ -173,7 +171,7 @@
if (flowEntry.flowEntryUserState() == FlowEntryUserState.FE_USER_DELETE)
continue; // Skip: all Flow Entries were deleted earlier
- if (addFlowEntry(flowManager, dbHandler, flowObj, flowEntry) == null) {
+ if (addFlowEntry(dbHandler, flowObj, flowEntry) == null) {
dbHandler.rollback();
return false;
}
@@ -191,14 +189,12 @@
/**
* Add a flow entry to the Network MAP.
*
- * @param flowManager the Flow Manager to use.
* @param dbHandler the Graph Database handler to use.
* @param flowObj the corresponding Flow Path object for the Flow Entry.
* @param flowEntry the Flow Entry to install.
* @return the added Flow Entry object on success, otherwise null.
*/
- static IFlowEntry addFlowEntry(FlowManager flowManager,
- GraphDBOperation dbHandler,
+ static IFlowEntry addFlowEntry(GraphDBOperation dbHandler,
IFlowPath flowObj,
FlowEntry flowEntry) {
// Flow edges
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
index 7f43fe9..158bdee 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
@@ -228,7 +228,7 @@
flowEntry.setFlowId(new FlowId(flowPath.flowId().value()));
}
- if (FlowDatabaseOperation.addFlow(this, dbHandlerApi, flowPath, flowId)) {
+ if (FlowDatabaseOperation.addFlow(dbHandlerApi, flowPath, flowId)) {
datagridService.notificationSendFlowAdded(flowPath);
return true;
}
@@ -243,8 +243,8 @@
* @return the added Flow Entry object on success, otherwise null.
*/
private IFlowEntry addFlowEntry(IFlowPath flowObj, FlowEntry flowEntry) {
- return FlowDatabaseOperation.addFlowEntry(this, dbHandlerInner,
- flowObj, flowEntry);
+ return FlowDatabaseOperation.addFlowEntry(dbHandlerInner, flowObj,
+ flowEntry);
}
/**
@@ -616,8 +616,8 @@
// Write the Flow Path to the Network Map
//
try {
- if (! FlowDatabaseOperation.addFlow(this, dbHandlerInner,
- flowPath, dummyFlowId)) {
+ if (! FlowDatabaseOperation.addFlow(dbHandlerInner, flowPath,
+ dummyFlowId)) {
String logMsg = "Cannot write to Network Map Flow Path " +
flowPath.flowId();
log.error(logMsg);