src-java/flowmonitoring-topology/flowmonitoring-storm-topology/src/main/java/org/openkilda/wfm/topology/flowmonitoring/service/IslCacheService.java
/**
     * Update RTT latency for ISL.
     */
Update RTT latency for ISL.
Update RTT latency for ISL .
public void handleRoundTripLatency(IslRoundTripLatency data) {
        List<Link> links = linkStates.keySet().stream()
                .filter(link -> link.srcEquals(data.getSrcSwitchId(), data.getSrcPortNo()))
                .collect(Collectors.toList());
        long currentTimeMillis = clock.millis();
        links.forEach(link -> {
            LinkState linkState = linkStates.get(link);
            if (linkState == null) {
                linkStates.put(link, LinkState.builder()
                        .rttLatency(data.getLatency())
                        .rttTimestamp(currentTimeMillis)
                        .build());
            } else {
                linkState.setRttLatency(data.getLatency());
                linkState.setRttTimestamp(currentTimeMillis);
            }
        });
    }
public void handleRoundTripLatency ( IslRoundTripLatency data ) { List < Link > links = linkStates . keySet ( ) . stream ( ) . filter ( link -> link . srcEquals ( data . getSrcSwitchId ( ) , data . getSrcPortNo ( ) ) ) . collect ( Collectors . toList ( ) ) ; long currentTimeMillis = clock . millis ( ) ; links . forEach ( link -> { LinkState linkState = linkStates . get ( link ) ; if ( linkState == null ) { linkStates . put ( link , LinkState . builder ( ) . rttLatency ( data . getLatency ( ) ) . rttTimestamp ( currentTimeMillis ) . build ( ) ) ; } else { linkState . setRttLatency ( data . getLatency ( ) ) ; linkState . setRttTimestamp ( currentTimeMillis ) ; } } ) ; }
Update RTT latency for ISL.
Update RTT latency for ISL .