Package org.drools.core.reteoo.builder
Class BuildContext
- java.lang.Object
-
- org.drools.core.reteoo.builder.BuildContext
-
public class BuildContext extends Object
A build context for Reteoo Builder
-
-
Constructor Summary
Constructors Constructor Description BuildContext(InternalKnowledgeBase kBase)
-
Method Summary
-
-
-
Constructor Detail
-
BuildContext
public BuildContext(InternalKnowledgeBase kBase)
-
-
Method Detail
-
isEmptyForAllBetaConstraints
public boolean isEmptyForAllBetaConstraints()
-
syncObjectTypesWithObjectCount
public void syncObjectTypesWithObjectCount()
-
getObjectSource
public ObjectSource getObjectSource()
- Returns:
- the objectSource
-
setObjectSource
public void setObjectSource(ObjectSource objectSource)
- Parameters:
objectSource- the objectSource to set
-
addPattern
public void addPattern(Pattern pattern)
-
getTupleSource
public LeftTupleSource getTupleSource()
- Returns:
- the tupleSource
-
setTupleSource
public void setTupleSource(LeftTupleSource tupleSource)
- Parameters:
tupleSource- the tupleSource to set
-
getKnowledgeBase
public InternalKnowledgeBase getKnowledgeBase()
Returns context rulebase
-
getWorkingMemories
public Collection<InternalWorkingMemory> 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
public void releaseId(NetworkNode node)
Method used to undo previous id assignment
-
push
public void push(RuleConditionElement rce)
Adds the rce to the build stack
-
pop
public RuleConditionElement pop()
Removes the top stack element
-
peek
public RuleConditionElement peek()
Returns the top stack element without removing it
-
getBuildstack
public Collection<RuleConditionElement> getBuildstack()
-
getBetaconstraints
public List<BetaNodeFieldConstraint> getBetaconstraints()
-
setBetaconstraints
public void setBetaconstraints(List<BetaNodeFieldConstraint> betaconstraints)
-
getAlphaConstraints
public List<AlphaNodeFieldConstraint> getAlphaConstraints()
-
addPathEndNode
public void addPathEndNode(PathEndNode node)
-
isTupleMemoryEnabled
public boolean isTupleMemoryEnabled()
-
setTupleMemoryEnabled
public void setTupleMemoryEnabled(boolean hasLeftMemory)
-
isObjectTypeNodeMemoryEnabled
public boolean isObjectTypeNodeMemoryEnabled()
-
setObjectTypeNodeMemoryEnabled
public void setObjectTypeNodeMemoryEnabled(boolean hasObjectTypeMemory)
-
isQuery
public boolean isQuery()
-
getCurrentEntryPoint
public EntryPointId getCurrentEntryPoint()
- Returns:
- the currentEntryPoint
-
setCurrentEntryPoint
public void setCurrentEntryPoint(EntryPointId currentEntryPoint)
- Parameters:
currentEntryPoint- the currentEntryPoint to set
-
getPartitionId
public RuleBasePartitionId getPartitionId()
- Returns:
- the partitionId
-
setPartitionId
public void setPartitionId(RuleBasePartitionId partitionId)
- Parameters:
partitionId- the partitionId to set
-
isStreamMode
public boolean isStreamMode()
-
getExpirationOffset
public long getExpirationOffset(Pattern pattern)
-
getRule
public RuleImpl getRule()
-
setRule
public void setRule(RuleImpl rule)
-
getSubRule
public GroupElement getSubRule()
-
popRuleComponent
public RuleComponent 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
public RuleComponent 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
public void pushRuleComponent(RuleComponent ruleComponent)
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
public ObjectTypeNode getRootObjectTypeNode()
-
setRootObjectTypeNode
public void setRootObjectTypeNode(ObjectTypeNode source)
-
getLastBuiltPatterns
public Pattern[] getLastBuiltPatterns()
-
setLastBuiltPattern
public void setLastBuiltPattern(Pattern lastBuiltPattern)
-
getComponentFactory
public KieComponentFactory getComponentFactory()
-
getConsequenceName
public String getConsequenceName()
-
setConsequenceName
public void setConsequenceName(String consequenceName)
-
-