use of org.openkilda.messaging.payload.flow.FlowsPayload in project open-kilda by telstra.
the class FlowServiceImpl method getFlows.
/**
* {@inheritDoc}
*/
@Override
public InfoMessage getFlows(final FlowIdStatusPayload payload, final String correlationId) {
Set<Flow> flows = flowRepository.findAll();
List<FlowPayload> flowsPayload = new ArrayList<>(flows.size() / 2);
for (Flow flow : flows) {
if ((flow.getCookie() & DIRECT_FLOW_COOKIE) == DIRECT_FLOW_COOKIE) {
flowsPayload.add(getFlowPayloadByFlow(flow));
}
}
logger.debug("Flows get: {}", flowsPayload);
return new InfoMessage(new FlowsResponse(new FlowsPayload(flowsPayload)), System.currentTimeMillis(), correlationId, Destination.WFM);
}
Aggregations