use of com.sequenceiq.cloudbreak.reactor.api.event.StackEvent in project cloudbreak by hortonworks.
the class StackCreationActions method createCredentialAction.
@Bean(name = "CREATE_CREDENTIAL_STATE")
public Action<?, ?> createCredentialAction() {
return new AbstractStackCreationAction<StackEvent>(StackEvent.class) {
@Override
protected void doExecute(StackContext context, StackEvent payload, Map<Object, Object> variables) {
variables.put(START_DATE, new Date());
stackCreationService.startProvisioning(context);
sendEvent(context);
}
@Override
protected Selectable createRequest(StackContext context) {
return new CreateCredentialRequest(context.getCloudContext(), context.getCloudCredential(), context.getCloudStack());
}
};
}
use of com.sequenceiq.cloudbreak.reactor.api.event.StackEvent in project cloudbreak by hortonworks.
the class ReactorFlowManager method triggerClusterStop.
public void triggerClusterStop(Long stackId) {
String selector = FlowChainTriggers.FULL_STOP_TRIGGER_EVENT;
notify(selector, new StackEvent(selector, stackId));
}
use of com.sequenceiq.cloudbreak.reactor.api.event.StackEvent in project cloudbreak by hortonworks.
the class ReactorFlowManager method triggerClusterTermination.
public void triggerClusterTermination(Long stackId, Boolean withStackDelete, Boolean deleteDependencies) {
Boolean secure = stackService.get(stackId).getCluster().isSecure();
if (withStackDelete) {
String selector = secure ? FlowChainTriggers.PROPER_TERMINATION_TRIGGER_EVENT : FlowChainTriggers.TERMINATION_TRIGGER_EVENT;
notify(selector, new TerminationEvent(selector, stackId, false, deleteDependencies));
cancelRunningFlows(stackId);
} else {
String selector = (secure ? ClusterTerminationEvent.PROPER_TERMINATION_EVENT : ClusterTerminationEvent.TERMINATION_EVENT).event();
notify(selector, new StackEvent(selector, stackId));
}
}
use of com.sequenceiq.cloudbreak.reactor.api.event.StackEvent in project cloudbreak by hortonworks.
the class ReactorFlowManager method triggerClusterStart.
public void triggerClusterStart(Long stackId) {
String selector = CLUSTER_START_EVENT.event();
notify(selector, new StackEvent(selector, stackId));
}
use of com.sequenceiq.cloudbreak.reactor.api.event.StackEvent in project cloudbreak by hortonworks.
the class ReactorFlowManager method triggerClusterSync.
public void triggerClusterSync(Long stackId) {
String selector = CLUSTER_SYNC_EVENT.event();
notify(selector, new StackEvent(selector, stackId));
}
Aggregations