Search in sources :

Example 1 with EphemeralClusterUpdateSuccess

use of com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateSuccess in project cloudbreak by hortonworks.

the class EphemeralClusterUpdateHandler method accept.

@Override
public void accept(Event<EphemeralClusterUpdateRequest> event) {
    EphemeralClusterUpdateRequest request = event.getData();
    Selectable response;
    try {
        clusterServiceRunner.updateSaltState(request.getStackId());
        response = new EphemeralClusterUpdateSuccess(request.getStackId());
    } catch (Exception e) {
        response = new EphemeralClusterUpdateFailed(request.getStackId(), e);
    }
    eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Also used : EphemeralClusterUpdateRequest(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateRequest) EphemeralClusterUpdateSuccess(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateSuccess) Selectable(com.sequenceiq.cloudbreak.cloud.event.Selectable) EphemeralClusterUpdateFailed(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateFailed)

Aggregations

Selectable (com.sequenceiq.cloudbreak.cloud.event.Selectable)1 EphemeralClusterUpdateFailed (com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateFailed)1 EphemeralClusterUpdateRequest (com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateRequest)1 EphemeralClusterUpdateSuccess (com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateSuccess)1