Class BuildContext


  • public class BuildContext
    extends Object
    A build context for Reteoo Builder
    • 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
      • getWorkingMemories

        public Collection<InternalWorkingMemory> getWorkingMemories()
        Return the array of working memories associated with the given rulebase.
      • getNextId

        public int getNextId()
        Returns an Id for the next node
      • getNextId

        public int getNextId​(String topic)
      • releaseId

        public void releaseId​(NetworkNode node)
        Method used to undo previous id assignment
      • 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
      • getNodes

        public List<BaseNode> getNodes()
        Returns:
        the nodes
      • setNodes

        public void setNodes​(List<BaseNode> nodes)
        Parameters:
        nodes - the nodes to set
      • setPartitionId

        public void setPartitionId​(RuleBasePartitionId partitionId)
        Parameters:
        partitionId - the partitionId to set
      • isStreamMode

        public boolean isStreamMode()
      • getExpirationOffset

        public long getExpirationOffset​(Pattern pattern)
      • setRule

        public void setRule​(RuleImpl rule)
      • 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)
      • getConsequenceName

        public String getConsequenceName()
      • setConsequenceName

        public void setConsequenceName​(String consequenceName)