use of org.openkilda.messaging.payload.history.FlowHistoryPayload in project open-kilda by telstra.
the class HistoryOperationsBolt method getFlowHistory.
@TimedExecution("get_flow_history")
private List<InfoData> getFlowHistory(GetFlowHistoryRequest request) {
Instant timeFrom = Instant.ofEpochSecond(request.getTimestampFrom());
Instant timeTo = Instant.ofEpochSecond(request.getTimestampTo() + 1).minusMillis(1);
return historyService.listFlowEvents(request.getFlowId(), timeFrom, timeTo, request.getMaxCount()).stream().map(entry -> {
List<FlowHistoryPayload> payload = listFlowHistories(entry);
List<FlowDumpPayload> dumps = listFlowDumps(entry);
return HistoryMapper.INSTANCE.map(entry, payload, dumps);
}).collect(Collectors.toList());
}
Aggregations