src-java/server42/server42-control-storm-topology/src/main/java/org/openkilda/server42/control/topology/service/RouterService.java
/**
     * Part of LCM. Sends flow sync messages to FlowHandler or deactivate in case of feature disabled.
     */
Part of LCM. Sends flow sync messages to FlowHandler or deactivate in case of feature disabled.
Part of LCM . Sends flow sync messages to FlowHandler or deactivate in case of feature disabled .
public void processSync() {
        if (isFlowRttFeatureToggle()) {
            Collection<SwitchProperties> all = switchPropertiesRepository.findAll();
            all.stream()
                    .filter(SwitchProperties::isServer42FlowRtt)
                    .forEach(s -> carrier.syncFlowsOnSwitch(s.getSwitchObj().getSwitchId()));
            all.stream()
                    .filter(switchProperties -> !switchProperties.isServer42FlowRtt())
                    .forEach(s -> carrier.deactivateFlowMonitoringOnSwitch(s.getSwitchObj().getSwitchId()));
        } else {
            switchRepository.findAll()
                    .forEach(s -> carrier.deactivateFlowMonitoringOnSwitch(s.getSwitchId()));
        }
    }
public void processSync ( ) { if ( isFlowRttFeatureToggle ( ) ) { Collection < SwitchProperties > all = switchPropertiesRepository . findAll ( ) ; all . stream ( ) . filter ( SwitchProperties :: isServer42FlowRtt ) . forEach ( s -> carrier . syncFlowsOnSwitch ( s . getSwitchObj ( ) . getSwitchId ( ) ) ) ; all . stream ( ) . filter ( switchProperties -> ! switchProperties . isServer42FlowRtt ( ) ) . forEach ( s -> carrier . deactivateFlowMonitoringOnSwitch ( s . getSwitchObj ( ) . getSwitchId ( ) ) ) ; } else { switchRepository . findAll ( ) . forEach ( s -> carrier . deactivateFlowMonitoringOnSwitch ( s . getSwitchId ( ) ) ) ; } }
Part of LCM.
Part of LCM .