Class DSLRule<U,V>
java.lang.Object
com.helixframework.rules.rule.BaseRule
com.helixframework.rules.rule.java.JavaRule
com.helixframework.rules.rule.java.dsl.DSLRule<U,V>
- All Implemented Interfaces:
Rule
DSLRule which returns an executable Action if one or more Conditions are met.
-
Field Summary
FieldsFields inherited from interface com.helixframework.rules.rule.Rule
DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyInternal(RuleContext<?> ctx) Applies a rule context across a Condition set.protected <T> TapplyInternal(RuleContext<?> ctx, Class<T> outputType) Unused as we store the result in the RuleContext itself.Returns the conditionSet.Methods inherited from class com.helixframework.rules.rule.BaseRule
apply, apply, apply, apply, getClassification, getDependencies, getDescription, getMaxRetries, getName, getTags, getTimeout
-
Field Details
-
DSL_RULE_INPUT
- See Also:
-
DSL_RULE_OUTPUT
- See Also:
-
-
Constructor Details
-
DSLRule
Creates a new instance ofDSLRule.- Parameters:
config- java rule configurationconditionSet- DSL rule condition set
-
-
Method Details
-
applyInternal
Applies a rule context across a Condition set. If a match is found, stores a lazy execution in DSL_RULE_INPUT. The realized lazy execution result will be stored in DSL_RULE_OUTPUT.- Specified by:
applyInternalin classBaseRule- Parameters:
ctx- rule context
-
applyInternal
Unused as we store the result in the RuleContext itself.- Specified by:
applyInternalin classBaseRule- Type Parameters:
T- type of rule output- Parameters:
ctx- rule contextoutputType- type of rule output- Returns:
- rule result
-
getConditionSet
Returns the conditionSet.- Returns:
- conditionSet
-