use of org.openkilda.messaging.nbtopology.request.PortHistoryRequest in project open-kilda by telstra.
the class SwitchServiceImpl method getPortHistory.
@Override
public CompletableFuture<List<PortHistoryResponse>> getPortHistory(SwitchId switchId, int port, Instant from, Instant to) {
PortHistoryRequest request = new PortHistoryRequest(switchId, port, from, to);
Message message = new CommandMessage(request, System.currentTimeMillis(), RequestCorrelationId.getId());
return messagingChannel.sendAndGetChunked(nbworkerTopic, message).thenApply(responses -> responses.stream().map(PortHistoryPayload.class::cast).map(switchMapper::map).collect(Collectors.toList()));
}
Aggregations