src-java/server42/server42-control-storm-topology/src/main/java/org/openkilda/server42/control/topology/service/RouterService.java
/**
     * Determinate feature toggler call. Generate messages with SwitchId as key for shuffling.
     * @param featureEnabled flag
     */
Determinate feature toggler call. Generate messages with SwitchId as key for shuffling.
@param featureEnabled flag
Determinate feature toggler call . Generate messages with SwitchId as key for shuffling . @param featureEnabled flag
public void handleFlowRttFeatureToggle(Boolean featureEnabled) {
        if (featureEnabled) {
            switchPropertiesRepository.findAll()
                    .stream()
                    .filter(SwitchProperties::isServer42FlowRtt)
                    .forEach(s -> carrier.activateFlowMonitoringOnSwitch(s.getSwitchId()));
        } else {
            switchRepository.findAll()
                    .forEach(s -> carrier.deactivateFlowMonitoringOnSwitch(s.getSwitchId()));
        }
    }
public void handleFlowRttFeatureToggle ( Boolean featureEnabled ) { if ( featureEnabled ) { switchPropertiesRepository . findAll ( ) . stream ( ) . filter ( SwitchProperties :: isServer42FlowRtt ) . forEach ( s -> carrier . activateFlowMonitoringOnSwitch ( s . getSwitchId ( ) ) ) ; } else { switchRepository . findAll ( ) . forEach ( s -> carrier . deactivateFlowMonitoringOnSwitch ( s . getSwitchId ( ) ) ) ; } }
Determinate feature toggler call.
Determinate feature toggler call .