use of org.openkilda.messaging.payload.history.FlowDumpPayload 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());
}
use of org.openkilda.messaging.payload.history.FlowDumpPayload in project open-kilda by telstra.
the class HistoryMapper method map.
/**
* Map {@link FlowEventDump} into {@link FlowDumpPayload}.
*/
public FlowDumpPayload map(FlowEventDump dump) {
FlowDumpPayload result = generatedMap(dump);
result.setForwardCookie(fallbackIfNull(mapCookie(dump.getForwardCookie()), 0L));
result.setReverseCookie(fallbackIfNull(mapCookie(dump.getReverseCookie()), 0L));
return result;
}
Aggregations