Search in sources :

Example 1 with FlowMeterEntries

use of org.openkilda.messaging.info.meter.FlowMeterEntries in project open-kilda by telstra.

the class FlowMeterModifyFsm method finished.

protected void finished(FlowMeterModifyState from, FlowMeterModifyState to, FlowMeterModifyEvent event, Object context) {
    FlowMeterEntries response = new FlowMeterEntries(switchMeterEntriesList.get(0), switchMeterEntriesList.get(1));
    log.info("Key: {}; FSM finished work", key);
    carrier.endProcessing(key);
    carrier.sendToResponseSplitterBolt(key, Collections.singletonList(response));
}
Also used : FlowMeterEntries(org.openkilda.messaging.info.meter.FlowMeterEntries)

Example 2 with FlowMeterEntries

use of org.openkilda.messaging.info.meter.FlowMeterEntries 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);
}
Also used : FlowMeterEntries(org.openkilda.messaging.info.meter.FlowMeterEntries) MeterModifyRequest(org.openkilda.messaging.nbtopology.request.MeterModifyRequest) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Aggregations

FlowMeterEntries (org.openkilda.messaging.info.meter.FlowMeterEntries)2 CommandMessage (org.openkilda.messaging.command.CommandMessage)1 MeterModifyRequest (org.openkilda.messaging.nbtopology.request.MeterModifyRequest)1