Search in sources :

Example 1 with TypedFlowEntryWithLoad

use of org.onosproject.net.statistic.TypedFlowEntryWithLoad in project onos by opennetworkinglab.

the class FlowStatisticManager method toFlowEntryWithLoad.

private List<TypedFlowEntryWithLoad> toFlowEntryWithLoad(List<FlowEntryWithLoad> loadList) {
    // convert FlowEntryWithLoad list to TypedFlowEntryWithLoad list
    List<TypedFlowEntryWithLoad> tfelList = new ArrayList<>();
    loadList.forEach(fel -> {
        StoredFlowEntry sfe = fel.storedFlowEntry();
        TypedStoredFlowEntry.FlowLiveType liveType = toTypedStoredFlowEntryLiveType(sfe.liveType());
        TypedStoredFlowEntry tfe = new DefaultTypedFlowEntry(sfe, liveType);
        TypedFlowEntryWithLoad tfel = new TypedFlowEntryWithLoad(fel.connectPoint(), tfe, fel.load());
        tfelList.add(tfel);
    });
    return tfelList;
}
Also used : TypedStoredFlowEntry(org.onosproject.net.flow.TypedStoredFlowEntry) TypedStoredFlowEntry(org.onosproject.net.flow.TypedStoredFlowEntry) StoredFlowEntry(org.onosproject.net.flow.StoredFlowEntry) TypedFlowEntryWithLoad(org.onosproject.net.statistic.TypedFlowEntryWithLoad) DefaultTypedFlowEntry(org.onosproject.net.flow.DefaultTypedFlowEntry) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 DefaultTypedFlowEntry (org.onosproject.net.flow.DefaultTypedFlowEntry)1 StoredFlowEntry (org.onosproject.net.flow.StoredFlowEntry)1 TypedStoredFlowEntry (org.onosproject.net.flow.TypedStoredFlowEntry)1 TypedFlowEntryWithLoad (org.onosproject.net.statistic.TypedFlowEntryWithLoad)1