@Test public void handleOneWayLatencyIslMovedTest() { Instant time = Instant.now().minusSeconds(LATENCY_TIMEOUT).minusMillis(500); for (int i = 0; i < 4; i++) { sendForwardOneWayLatency(i, time); verifyNoMoreInteractions(carrier); time = time.plusSeconds(1); } islStatsService.handleIstStatusUpdateNotification( new IslStatusUpdateNotification(SWITCH_ID_1, PORT_1, SWITCH_ID_2, PORT_2, MOVED)); verifyNoMoreInteractions(carrier); }
public void handleIstStatusUpdateNotification(IslStatusUpdateNotification notification) { IslKey key = new IslKey(notification.getSrcSwitchId(), notification.getSrcPortNo(), notification.getDstSwitchId(), notification.getDstPortNo()); if (notification.getStatus() == IslStatus.MOVED) { handleIslMoved(key); handleIslMoved(key.getReverse()); } else if (notification.getStatus() == IslStatus.INACTIVE) { handleIslDown(key); handleIslDown(key.getReverse()); } }
IslStatsService { public void handleIstStatusUpdateNotification(IslStatusUpdateNotification notification) { IslKey key = new IslKey(notification.getSrcSwitchId(), notification.getSrcPortNo(), notification.getDstSwitchId(), notification.getDstPortNo()); if (notification.getStatus() == IslStatus.MOVED) { handleIslMoved(key); handleIslMoved(key.getReverse()); } else if (notification.getStatus() == IslStatus.INACTIVE) { handleIslDown(key); handleIslDown(key.getReverse()); } } }
IslStatsService { public void handleIstStatusUpdateNotification(IslStatusUpdateNotification notification) { IslKey key = new IslKey(notification.getSrcSwitchId(), notification.getSrcPortNo(), notification.getDstSwitchId(), notification.getDstPortNo()); if (notification.getStatus() == IslStatus.MOVED) { handleIslMoved(key); handleIslMoved(key.getReverse()); } else if (notification.getStatus() == IslStatus.INACTIVE) { handleIslDown(key); handleIslDown(key.getReverse()); } } IslStatsService(IslStatsCarrier carrier, long latencyTimeout); }
IslStatsService { public void handleIstStatusUpdateNotification(IslStatusUpdateNotification notification) { IslKey key = new IslKey(notification.getSrcSwitchId(), notification.getSrcPortNo(), notification.getDstSwitchId(), notification.getDstPortNo()); if (notification.getStatus() == IslStatus.MOVED) { handleIslMoved(key); handleIslMoved(key.getReverse()); } else if (notification.getStatus() == IslStatus.INACTIVE) { handleIslDown(key); handleIslDown(key.getReverse()); } } IslStatsService(IslStatsCarrier carrier, long latencyTimeout); void handleRoundTripLatencyMetric(long timestamp, IslRoundTripLatency data, Endpoint destination); void handleOneWayLatencyMetric(long timestamp, IslOneWayLatency data); void handleIstStatusUpdateNotification(IslStatusUpdateNotification notification); }
IslStatsService { public void handleIstStatusUpdateNotification(IslStatusUpdateNotification notification) { IslKey key = new IslKey(notification.getSrcSwitchId(), notification.getSrcPortNo(), notification.getDstSwitchId(), notification.getDstPortNo()); if (notification.getStatus() == IslStatus.MOVED) { handleIslMoved(key); handleIslMoved(key.getReverse()); } else if (notification.getStatus() == IslStatus.INACTIVE) { handleIslDown(key); handleIslDown(key.getReverse()); } } IslStatsService(IslStatsCarrier carrier, long latencyTimeout); void handleRoundTripLatencyMetric(long timestamp, IslRoundTripLatency data, Endpoint destination); void handleOneWayLatencyMetric(long timestamp, IslOneWayLatency data); void handleIstStatusUpdateNotification(IslStatusUpdateNotification notification);  }