use of org.openkilda.messaging.info.event.IslBaseLatency in project open-kilda by telstra.
the class IslDataSplitterBolt method handleInput.
@Override
protected void handleInput(Tuple input) throws PipelineException {
Message message = pullValue(input, FIELD_ID_PAYLOAD, Message.class);
InfoData infoData;
if (message instanceof InfoMessage) {
infoData = ((InfoMessage) message).getData();
} else {
unhandledInput(input);
return;
}
if (infoData instanceof IslChangedInfoData) {
IslChangedInfoData data = (IslChangedInfoData) infoData;
emitWithContext(ISL_UPDATE_STREAM_ID.name(), input, new Values(getIslKey(data.getSource().getDatapath(), data.getSource().getPortNumber()), data));
emitWithContext(ISL_UPDATE_STREAM_ID.name(), input, new Values(getIslKey(data.getDestination().getDatapath(), data.getDestination().getPortNumber()), revert(data)));
} else if (infoData instanceof IslBaseLatency) {
IslBaseLatency islBaseLatency = (IslBaseLatency) infoData;
emit(input, new Values(getIslKey(islBaseLatency.getSrcSwitchId(), islBaseLatency.getSrcPortNo()), infoData, getCommandContext()));
} else {
unhandledInput(input);
}
}
Aggregations