Search in sources :

Example 1 with EphemeralClusterUpdateTriggerEvent

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

the class ReactorFlowManager method triggerEphemeralUpdate.

public void triggerEphemeralUpdate(Long stackId) {
    String selector = EphemeralClusterEvent.EPHEMERAL_CLUSTER_UPDATE_TRIGGER_EVENT.event();
    notify(selector, new EphemeralClusterUpdateTriggerEvent(selector, stackId));
}
Also used : EphemeralClusterUpdateTriggerEvent(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateTriggerEvent)

Example 2 with EphemeralClusterUpdateTriggerEvent

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

the class EphemeralClusterActions method updateNameserverAction.

@Bean(name = "EPHEMERAL_CLUSTER_UPDATE_STATE")
public Action<?, ?> updateNameserverAction() {
    return new AbstractClusterAction<EphemeralClusterUpdateTriggerEvent>(EphemeralClusterUpdateTriggerEvent.class) {

        @Override
        protected void doExecute(ClusterViewContext context, EphemeralClusterUpdateTriggerEvent payload, Map<Object, Object> variables) {
            ephemeralClusterService.updateClusterStarted(context.getStackId());
            Selectable request = new EphemeralClusterUpdateRequest(context.getStackId());
            sendEvent(context.getFlowId(), request.selector(), request);
        }
    };
}
Also used : EphemeralClusterUpdateRequest(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateRequest) Selectable(com.sequenceiq.cloudbreak.cloud.event.Selectable) EphemeralClusterUpdateTriggerEvent(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateTriggerEvent) AbstractClusterAction(com.sequenceiq.cloudbreak.core.flow2.cluster.AbstractClusterAction) Map(java.util.Map) ClusterViewContext(com.sequenceiq.cloudbreak.core.flow2.cluster.ClusterViewContext) Bean(org.springframework.context.annotation.Bean)

Aggregations

EphemeralClusterUpdateTriggerEvent (com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateTriggerEvent)2 Selectable (com.sequenceiq.cloudbreak.cloud.event.Selectable)1 AbstractClusterAction (com.sequenceiq.cloudbreak.core.flow2.cluster.AbstractClusterAction)1 ClusterViewContext (com.sequenceiq.cloudbreak.core.flow2.cluster.ClusterViewContext)1 EphemeralClusterUpdateRequest (com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateRequest)1 Map (java.util.Map)1 Bean (org.springframework.context.annotation.Bean)1