Search in sources :

Example 1 with PortsCommandData

use of org.openkilda.messaging.command.discovery.PortsCommandData in project open-kilda by telstra.

the class SwitchPortsSpout method nextTuple.

@Override
public void nextTuple() {
    final long now = now();
    if (now - lastTickTime > frequency) {
        CommandData data = new PortsCommandData(REQUESTER);
        logger.debug("emitting PortsCommandData: {}", data);
        String correlationId = format("SwitchPortsSpout-%s", UUID.randomUUID().toString());
        collector.emit(new Values(correlationId, data, correlationId));
        if (now - lastTickTime > frequency * 2) {
            logger.warn("long tick for PortsCommandData - {}ms", now - lastTickTime);
        }
        lastTickTime = now;
    }
    org.apache.storm.utils.Utils.sleep(1);
}
Also used : PortsCommandData(org.openkilda.messaging.command.discovery.PortsCommandData) Values(org.apache.storm.tuple.Values) CommandData(org.openkilda.messaging.command.CommandData) PortsCommandData(org.openkilda.messaging.command.discovery.PortsCommandData)

Aggregations

Values (org.apache.storm.tuple.Values)1 CommandData (org.openkilda.messaging.command.CommandData)1 PortsCommandData (org.openkilda.messaging.command.discovery.PortsCommandData)1