Class NoneMatchCombinatorDelegate
- All Implemented Interfaces:
NoneMatchCombinator
NoneMatchCombinator.- Since:
- 5.4.0
- Author:
- Stefan Dragisic
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNoneMatchCombinatorDelegate(WorkflowExecution workflowExecution) Creates a new delegate backed by the given workflow state. -
Method Summary
Modifier and TypeMethodDescriptionnoneMatch(Predicate<WorkflowStepResult> predicate, WorkflowStepResult... results) Guard combinator — ensures no completed result matches the given predicate.
-
Constructor Details
-
NoneMatchCombinatorDelegate
Creates a new delegate backed by the given workflow state.- Parameters:
workflowExecution- the workflow execution.
-
-
Method Details
-
noneMatch
public CombinatorWorkflowStepResult noneMatch(Predicate<WorkflowStepResult> predicate, WorkflowStepResult... results) Description copied from interface:NoneMatchCombinatorGuard combinator — ensures no completed result matches the given predicate. Short-circuits on the first match.Short-circuit (match found)
When a completed result matches the predicate, it becomes the "violator". The composite delegates all state queries to the violating result. Remaining results are not automatically cancelled — the caller is responsible for cancelling if desired.
Success (all complete, none matched)
When all results complete without any matching the predicate:
isSuccess()=true,result()=empty,isFailure()=false.Completion
isCompleted()is non-blocking and returnstruewhen any completed result matches the predicate or when all results have reached a terminal state.Cancellation
cancel()andcancel(reason)propagate to all results.Summary
Similar to
.allMatch()but with guard semantics: succeeds when none match, but short-circuits on first match to avoid cascading errors.Result categorization
The returned
CombinatorWorkflowStepResultprovidesmatched()andunmatched()to access categorized sub-results. FornoneMatch(WorkflowStepResult::failure, failingStep, slowStep)where failingStep fails (short-circuits) and slowStep is still running:matched()→ [failingStep] — results that satisfiedfailure()(violators!)unmatched()→ [slowStep] — all other results, including those not yet completed
- Specified by:
noneMatchin interfaceNoneMatchCombinator- Parameters:
predicate- the predicate that no result should match.results- the step results to guard.- Returns:
- a composite result which succeeds when no result matches, or short-circuits on the first match.
-