use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartClusterSuccess in project cloudbreak by hortonworks.
the class ResetFlowEventChainFactory method createFlowTriggerEventQueue.
@Override
public FlowTriggerEventQueue createFlowTriggerEventQueue(StackEvent event) {
Queue<Selectable> flowEventChain = new ConcurrentLinkedQueue<>();
flowEventChain.add(new StackEvent(CLUSTER_RESET_EVENT.event(), event.getResourceId(), event.accepted()));
flowEventChain.add(new StartClusterSuccess(CLUSTER_INSTALL_EVENT.event(), event.getResourceId()));
return new FlowTriggerEventQueue(getName(), event, flowEventChain);
}
use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartClusterSuccess in project cloudbreak by hortonworks.
the class StartClusterHandler method accept.
@Override
public void accept(Event<StartClusterRequest> event) {
Long stackId = event.getData().getResourceId();
Selectable response;
try {
clusterBuilderService.startCluster(stackId);
response = new StartClusterSuccess(stackId);
} catch (Exception e) {
response = new StartClusterFailed(stackId, e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Aggregations