Search in sources :

Example 36 with Payload

use of com.sequenceiq.cloudbreak.common.event.Payload in project cloudbreak by hortonworks.

the class InitializeMDCContextRestartAction method restart.

@Override
public void restart(FlowParameters flowParameters, String flowChainId, String event, Object payload) {
    Payload stackPayload = (Payload) payload;
    Stack stack = stackService.getStackById(stackPayload.getResourceId());
    MDCBuilder.buildMdcContext(stack);
    super.restart(flowParameters, flowChainId, event, payload);
}
Also used : Payload(com.sequenceiq.cloudbreak.common.event.Payload) Stack(com.sequenceiq.freeipa.entity.Stack)

Aggregations

Payload (com.sequenceiq.cloudbreak.common.event.Payload)36 Test (org.junit.jupiter.api.Test)11 Stack (com.sequenceiq.cloudbreak.domain.stack.Stack)10 Optional (java.util.Optional)10 Inject (javax.inject.Inject)10 Event (reactor.bus.Event)10 Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)9 MDCBuilder (com.sequenceiq.cloudbreak.logger.MDCBuilder)8 List (java.util.List)8 CloudContext (com.sequenceiq.cloudbreak.cloud.context.CloudContext)7 AvailabilityZone.availabilityZone (com.sequenceiq.cloudbreak.cloud.model.AvailabilityZone.availabilityZone)7 CloudCredential (com.sequenceiq.cloudbreak.cloud.model.CloudCredential)7 Location (com.sequenceiq.cloudbreak.cloud.model.Location)7 Location.location (com.sequenceiq.cloudbreak.cloud.model.Location.location)7 Region.region (com.sequenceiq.cloudbreak.cloud.model.Region.region)7 FlowParameters (com.sequenceiq.flow.core.FlowParameters)7 Map (java.util.Map)7 Collectors (java.util.stream.Collectors)7 StateContext (org.springframework.statemachine.StateContext)7 Crn (com.sequenceiq.cloudbreak.auth.crn.Crn)6