Package org.drools.core.reteoo.builder
Class BuildContext
java.lang.Object
org.drools.core.reteoo.builder.BuildContext
- All Implemented Interfaces:
RuleBuildContext
A build context for Reteoo Builder
-
Constructor Summary
ConstructorsConstructorDescriptionBuildContext(InternalRuleBase ruleBase, Collection<InternalWorkingMemory> workingMemories) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPathEndNode(PathEndNode node) voidaddPattern(Pattern pattern) longgetExpirationOffset(Pattern pattern) Pattern[]intintReturns an Id for the next nodegetNodes()getRule()Returns context rulebaseintReturn the array of working memories associated with the given rulebase.booleanbooleanisQuery()booleanbooleanpeek()Returns the top stack element without removing itPeeks at the top element from the rule component stack.pop()Removes the top stack elementRemoves the top element from the rule component stack.voidpush(RuleConditionElement rce) Adds the rce to the build stackvoidpushRuleComponent(RuleComponent ruleComponent) Adds the ruleComponent to the top of the rule component stack.voidreleaseId(NetworkNode node) Method used to undo previous id assignmentvoidsetBetaconstraints(List<BetaConstraint> betaconstraints) voidsetConsequenceName(String consequenceName) voidsetCurrentEntryPoint(EntryPointId currentEntryPoint) voidsetLastBuiltPattern(Pattern lastBuiltPattern) voidvoidsetObjectSource(ObjectSource objectSource) voidsetPartitionId(RuleBasePartitionId partitionId) voidsetRootObjectTypeNode(ObjectTypeNode source) voidvoidsetSubRuleIndex(int subRuleIndex) voidsetTupleMemoryEnabled(boolean hasLeftMemory) voidsetTupleSource(LeftTupleSource tupleSource) void
-
Constructor Details
-
BuildContext
-
-
Method Details
-
getTerminals
-
isEmptyForAllBetaConstraints
public boolean isEmptyForAllBetaConstraints() -
syncObjectTypesWithObjectCount
public void syncObjectTypesWithObjectCount() -
getObjectSource
- Returns:
- the objectSource
-
setObjectSource
- Parameters:
objectSource- the objectSource to set
-
getPatterns
-
addPattern
-
getTupleSource
- Returns:
- the tupleSource
-
setTupleSource
- Parameters:
tupleSource- the tupleSource to set
-
getRuleBase
Returns context rulebase -
getWorkingMemories
Return the array of working memories associated with the given rulebase. -
getNextNodeId
public int getNextNodeId()Returns an Id for the next node -
getNextMemoryId
public int getNextMemoryId() -
releaseId
Method used to undo previous id assignment -
push
Adds the rce to the build stack -
pop
Removes the top stack element -
peek
Returns the top stack element without removing it -
getBuildstack
-
getBetaconstraints
-
setBetaconstraints
-
getAlphaConstraints
-
addPathEndNode
-
isTupleMemoryEnabled
public boolean isTupleMemoryEnabled() -
setTupleMemoryEnabled
public void setTupleMemoryEnabled(boolean hasLeftMemory) -
isQuery
public boolean isQuery() -
getCurrentEntryPoint
- Returns:
- the currentEntryPoint
-
setCurrentEntryPoint
- Parameters:
currentEntryPoint- the currentEntryPoint to set
-
getNodes
- Returns:
- the nodes
-
setNodes
- Parameters:
nodes- the nodes to set
-
getPartitionId
- Returns:
- the partitionId
-
setPartitionId
- Parameters:
partitionId- the partitionId to set
-
isStreamMode
public boolean isStreamMode() -
getExpirationOffset
-
getRule
- Specified by:
getRulein interfaceRuleBuildContext
-
setRule
-
getSubRule
-
popRuleComponent
Removes the top element from the rule component stack. The rule component stack is used to add trackability to the ReteOO nodes so that they can be linked to the rule components that originated them. -
peekRuleComponent
Peeks at the top element from the rule component stack. The rule component stack is used to add trackability to the ReteOO nodes so that they can be linked to the rule components that originated them. -
pushRuleComponent
Adds the ruleComponent to the top of the rule component stack. The rule component stack is used to add trackability to the ReteOO nodes so that they can be linked to the rule components that originated them. -
getRootObjectTypeNode
-
setRootObjectTypeNode
-
getLastBuiltPatterns
-
setLastBuiltPattern
-
getConsequenceName
-
setConsequenceName
-
getSubRuleIndex
public int getSubRuleIndex() -
setSubRuleIndex
public void setSubRuleIndex(int subRuleIndex)
-