Hello,

I am writing an application where I need to install some short lived flows
on a switch that could get re-installed again and again on a switch.

Here's the code that writes my flow out :


  synchronized void writeFlow(Flow flow,
InstanceIdentifier<FlowCapableNode> flowNodeIdent) {
        ReadWriteTransaction modification =
dataBrokerService.newReadWriteTransaction();
        final InstanceIdentifier<Flow> path1 =
flowNodeIdent.child(Table.class, new TableKey(flow.getTableId()))
                .child(Flow.class, flow.getKey());
        modification.merge(LogicalDatastoreType.CONFIGURATION, path1, flow,
true);
        modification.submit();
    }


I am invoking this code several times for the same flow. I think I am doing
something wrong by writing to the Configuration store again and again for
the SAME flow.

It works but takes longer than I think it should. Perhaps I am doing
something wrong and there is a more efficient way to do this?

Thanks,

Ranga

-- 
M. Ranganathan
_______________________________________________
openflowplugin-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev

Reply via email to