use of org.openkilda.messaging.info.flow.FlowCacheSyncResponse in project open-kilda by telstra.
the class FlowServiceImpl method syncFlowCache.
/**
* {@inheritDoc}
*/
@Override
public FlowCacheSyncResults syncFlowCache(final String correlationId) {
LOGGER.debug("Flow cache sync: {}={}", CORRELATION_ID, correlationId);
FlowCacheSyncRequest data = new FlowCacheSyncRequest();
CommandMessage request = new CommandMessage(data, System.currentTimeMillis(), correlationId, Destination.WFM);
messageConsumer.clear();
messageProducer.send(topic, request);
Message message = (Message) messageConsumer.poll(correlationId);
FlowCacheSyncResponse response = (FlowCacheSyncResponse) validateInfoMessage(request, message, correlationId);
return response.getPayload();
}
Aggregations