Class BranchingStep


public class BranchingStep extends ClusterStateActionStep
This step changes its getNextStepKey() depending on the outcome of a defined predicate. It performs no changes to the cluster state.
  • Field Details

  • Constructor Details

    • BranchingStep

      public BranchingStep(Step.StepKey key, Step.StepKey nextStepKeyOnFalse, Step.StepKey nextStepKeyOnTrue, BiPredicate<Index,ClusterState> predicate)
      BranchingStep is a step whose next step is based on the return value of a specific predicate.
      Parameters:
      key - the step's key
      nextStepKeyOnFalse - the key of the step to run if predicate returns false
      nextStepKeyOnTrue - the key of the step to run if predicate returns true
      predicate - the condition to check when deciding which step to run next
  • Method Details