use of com.sequenceiq.cloudbreak.core.flow2.cluster.AbstractClusterAction in project cloudbreak by hortonworks.
the class ClusterDownscaleActions method decommissionAction.
@Bean(name = "DECOMMISSION_STATE")
public Action<?, ?> decommissionAction() {
return new AbstractClusterAction<CollectDownscaleCandidatesResult>(CollectDownscaleCandidatesResult.class) {
@Override
protected void doExecute(ClusterViewContext context, CollectDownscaleCandidatesResult payload, Map<Object, Object> variables) {
Selectable request = new DecommissionRequest(context.getStackId(), payload.getHostGroupName(), payload.getHostNames());
sendEvent(context.getFlowId(), request.selector(), request);
}
};
}
Aggregations