use of org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException in project open-kilda by telstra.
the class FlowUpdateService method handleTimeoutByFlowId.
/**
* Handles timeout case.
* Used if the command identifier is unknown, so FSM is identified by the flow Id.
*/
public void handleTimeoutByFlowId(@NonNull String flowId) throws UnknownKeyException {
String commandKey = fsmRegister.getKeyByFlowId(flowId).orElseThrow(() -> new UnknownKeyException(flowId));
handleTimeout(commandKey);
}
use of org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException in project open-kilda by telstra.
the class FlowUpdateService method handleTimeout.
/**
* Handles timeout case.
*
* @param key command identifier.
*/
public void handleTimeout(@NonNull String key) throws UnknownKeyException {
log.debug("Handling timeout for {}", key);
FlowUpdateFsm fsm = fsmRegister.getFsmByKey(key).orElseThrow(() -> new UnknownKeyException(key));
fsmExecutor.fire(fsm, Event.TIMEOUT);
removeIfFinished(fsm, key);
}
use of org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException in project open-kilda by telstra.
the class FlowCreateService method handleAsyncResponseByFlowId.
/**
* Handles async response from worker.
* Used if the command identifier is unknown, so FSM is identified by the flow Id.
*/
public void handleAsyncResponseByFlowId(@NonNull String flowId, @NonNull SpeakerFlowSegmentResponse flowResponse) throws UnknownKeyException {
String commandKey = fsmRegister.getKeyByFlowId(flowId).orElseThrow(() -> new UnknownKeyException(flowId));
handleAsyncResponse(commandKey, flowResponse);
}
use of org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException in project open-kilda by telstra.
the class FlowCreateService method handleTimeoutByFlowId.
/**
* Handles timeout case.
* Used if the command identifier is unknown, so FSM is identified by the flow Id.
*/
public void handleTimeoutByFlowId(@NonNull String flowId) throws UnknownKeyException {
String commandKey = fsmRegister.getKeyByFlowId(flowId).orElseThrow(() -> new UnknownKeyException(flowId));
handleTimeout(commandKey);
}
use of org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException in project open-kilda by telstra.
the class FlowCreateService method handleTimeout.
/**
* Handles timeout case.
*
* @param key command identifier.
*/
public void handleTimeout(@NonNull String key) throws UnknownKeyException {
log.debug("Handling timeout for {}", key);
FlowCreateFsm fsm = fsmRegister.getFsmByKey(key).orElseThrow(() -> new UnknownKeyException(key));
fsm.setTimedOut(true);
fsmExecutor.fire(fsm, Event.TIMEOUT);
removeIfFinished(fsm, key);
}
Aggregations