use of org.openkilda.messaging.nbtopology.request.MeterModifyRequest in project open-kilda by telstra.
the class FlowMeterModifyHubBolt method onRequest.
@Override
protected void onRequest(Tuple input) throws PipelineException {
String key = input.getStringByField(MessageKafkaTranslator.FIELD_ID_KEY);
CommandData data = pullValue(input, MessageKafkaTranslator.FIELD_ID_PAYLOAD, CommandData.class);
if (data instanceof MeterModifyRequest) {
service.handleRequest(key, (MeterModifyRequest) data, new FlowHubCarrierImpl(input));
} else {
unhandledInput(input);
}
}
use of org.openkilda.messaging.nbtopology.request.MeterModifyRequest in project open-kilda by telstra.
the class FlowServiceImpl method modifyMeter.
/**
* {@inheritDoc}
*/
@Override
public CompletableFuture<FlowMeterEntries> modifyMeter(String flowId) {
MeterModifyRequest request = new MeterModifyRequest(flowId);
final String correlationId = RequestCorrelationId.getId();
CommandMessage message = new CommandMessage(request, System.currentTimeMillis(), correlationId);
return messagingChannel.sendAndGet(nbworkerTopic, message).thenApply(FlowMeterEntries.class::cast);
}
Aggregations