use of com.sequenceiq.cloudbreak.common.event.Selectable in project cloudbreak by hortonworks.
the class ProperTerminationFlowEventChainFactory method createFlowTriggerEventQueue.
@Override
public FlowTriggerEventQueue createFlowTriggerEventQueue(TerminationEvent event) {
Queue<Selectable> flowEventChain = new ConcurrentLinkedQueue<>();
flowEventChain.add(new TerminationEvent(ClusterTerminationEvent.PROPER_TERMINATION_EVENT.event(), event.getResourceId(), event.getTerminationType()));
flowEventChain.add(new TerminationEvent(START_EXTERNAL_DATABASE_TERMINATION_EVENT.event(), event.getResourceId(), event.getTerminationType()));
flowEventChain.add(new TerminationEvent(StackTerminationEvent.TERMINATION_EVENT.event(), event.getResourceId(), event.getTerminationType(), event.accepted()));
return new FlowTriggerEventQueue(getName(), event, flowEventChain);
}
use of com.sequenceiq.cloudbreak.common.event.Selectable in project cloudbreak by hortonworks.
the class ProvisionFlowEventChainFactory method createFlowTriggerEventQueue.
@Override
public FlowTriggerEventQueue createFlowTriggerEventQueue(StackEvent event) {
Queue<Selectable> flowEventChain = new ConcurrentLinkedQueue<>();
flowEventChain.add(new StackEvent(VALIDATE_CLOUD_CONFIG_EVENT.event(), event.getResourceId(), event.accepted()));
flowEventChain.add(new StackEvent(VALIDATE_KERBEROS_CONFIG_EVENT.event(), event.getResourceId(), event.accepted()));
flowEventChain.add(new StackEvent(START_EXTERNAL_DATABASE_CREATION_EVENT.event(), event.getResourceId(), event.accepted()));
flowEventChain.add(new ProvisionEvent(START_CREATION_EVENT.event(), event.getResourceId(), ProvisionType.REGULAR, event.accepted()));
flowEventChain.add(new ProvisionEvent(CLUSTER_CREATION_EVENT.event(), event.getResourceId(), ProvisionType.REGULAR));
return new FlowTriggerEventQueue(getName(), event, flowEventChain);
}
use of com.sequenceiq.cloudbreak.common.event.Selectable in project cloudbreak by hortonworks.
the class RecoveryBringupFlowEventChainFactory method createFlowTriggerEventQueue.
@Override
public FlowTriggerEventQueue createFlowTriggerEventQueue(StackEvent event) {
Queue<Selectable> flowEventChain = new ConcurrentLinkedQueue<>();
flowEventChain.add(new ProvisionEvent(START_CREATION_EVENT.event(), event.getResourceId(), ProvisionType.RECOVERY, event.accepted()));
flowEventChain.add(new ProvisionEvent(CLUSTER_CREATION_EVENT.event(), event.getResourceId(), ProvisionType.RECOVERY));
return new FlowTriggerEventQueue(getName(), event, flowEventChain);
}
use of com.sequenceiq.cloudbreak.common.event.Selectable 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.common.event.Selectable in project cloudbreak by hortonworks.
the class RotateClusterCertificatesFlowEventChainFactory method createFlowTriggerEventQueue.
@Override
public FlowTriggerEventQueue createFlowTriggerEventQueue(ClusterCertificatesRotationTriggerEvent event) {
Queue<Selectable> flowEventChain = new ConcurrentLinkedQueue<>();
flowEventChain.add(new StackEvent(SaltUpdateEvent.SALT_UPDATE_EVENT.event(), event.getResourceId(), event.accepted()));
flowEventChain.add(new ClusterCertificatesRotationTriggerEvent(ClusterCertificatesRotationEvent.CLUSTER_CMCA_ROTATION_EVENT.event(), event.getResourceId(), event.accepted(), event.getCertificateRotationType()));
return new FlowTriggerEventQueue(getName(), event, flowEventChain);
}
Aggregations