Change FlowBatchHandle to be interface class.
- Users can access to the shared flow batch operation map
using the FlowBatchHandle.
- FlowBatchHandle is an interface and the instance of it
can be obtained from APIs defined by FlowManagerService.
- The implementation of the map can be accessed only from
the implementation of the FlowBatchHandle.
- This task is a part of ONOS-1692 and ONOS-1842.
Change-Id: I651a2886d166765ca5aae6abcc2b844153ffb2bc
diff --git a/src/main/java/net/onrc/onos/core/flowmanager/FlowManagerModule.java b/src/main/java/net/onrc/onos/core/flowmanager/FlowManagerModule.java
index 86a3320..7a0b243 100644
--- a/src/main/java/net/onrc/onos/core/flowmanager/FlowManagerModule.java
+++ b/src/main/java/net/onrc/onos/core/flowmanager/FlowManagerModule.java
@@ -43,7 +43,7 @@
this.flowIdGenerator =
new FlowIdGeneratorWithIdBlockAllocator(idBlockAllocator);
this.conflictDetectionPolicy = ConflictDetectionPolicy.FREE;
- this.flowOperationMap = new FlowOperationMap();
+ this.flowOperationMap = new FlowOperationMap(idBlockAllocator);
// TODO: MatchActionOperationsIdGenerator should be retrieved from MatchAction Module.
this.maIdGenerator =
@@ -94,7 +94,7 @@
*/
@Override
public FlowBatchHandle executeBatch(FlowBatchOperation ops) {
- return flowOperationMap.putOperation(ops);
+ return flowOperationMap.putBatchOperation(ops);
}
@Override