Package org.drools.core.phreak
Class BuildtimeSegmentUtilities
- java.lang.Object
-
- org.drools.core.phreak.BuildtimeSegmentUtilities
-
public class BuildtimeSegmentUtilities extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intCONDITIONAL_BRANCH_BITstatic intJOIN_NODE_BITstatic intNOT_NODE_BITstatic intPASSIVE_EXISTS_NODE_BITstatic intREACTIVE_EXISTS_NODE_BIT
-
Constructor Summary
Constructors Constructor Description BuildtimeSegmentUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancanBeDisabled(BetaNode betaNode)static SegmentMemory.SegmentPrototype[]createLeftTupleNodeProtoMemories(LeftTupleNode lts, TerminalNode removingTn, InternalRuleBase rbase)static SegmentMemory.SegmentPrototype[]createPathProtoMemories(TerminalNode tn, TerminalNode removingTn, InternalRuleBase rbase)static SegmentMemory.SegmentPrototypecreateSegmentMemory(LeftTupleNode segmentRoot, LeftTupleNode segmentTip, int recordBefore, TerminalNode removingTn, InternalRuleBase rbase)Initialises the NodeSegment memory for all nodes in the segment.static LeftTupleNodefindSegmentRoot(LeftTupleNode tupleSource)static LeftTupleNodefindSegmentRoot(LeftTupleNode tupleSource, TerminalNode ignoreTn)static longgetPathAllLinkedMaskTest(SegmentMemory.SegmentPrototype[] smems, PathEndNode endNode)static booleanisAssociatedWith(org.drools.base.common.NetworkNode node, TerminalNode tn)static booleanisNonTerminalTipNode(LeftTupleNode node, TerminalNode removingTN)static booleanisRootNode(LeftTupleNode node, TerminalNode ignoreTn)Returns whether the node is the root of a segment.static booleanisSet(int mask, int bit)static booleanisTipNode(LeftTupleNode node, TerminalNode removingTN)Returns whether the node is the tip of a segment.static longnextNodePosMask(long posMask)static booleanrequiresAnEagerSegment(int nodeTypesInSegment)static booleansinkNotExclusivelyAssociatedWithTerminal(TerminalNode removingTN, LeftTupleNode sink)static intupdateNodeTypesMask(org.drools.base.common.NetworkNode node, int mask)static voidupdateSegmentEndNodes(PathEndNode endNode)
-
-
-
Field Detail
-
NOT_NODE_BIT
public static final int NOT_NODE_BIT
- See Also:
- Constant Field Values
-
JOIN_NODE_BIT
public static final int JOIN_NODE_BIT
- See Also:
- Constant Field Values
-
REACTIVE_EXISTS_NODE_BIT
public static final int REACTIVE_EXISTS_NODE_BIT
- See Also:
- Constant Field Values
-
PASSIVE_EXISTS_NODE_BIT
public static final int PASSIVE_EXISTS_NODE_BIT
- See Also:
- Constant Field Values
-
CONDITIONAL_BRANCH_BIT
public static final int CONDITIONAL_BRANCH_BIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
updateSegmentEndNodes
public static void updateSegmentEndNodes(PathEndNode endNode)
-
getPathAllLinkedMaskTest
public static long getPathAllLinkedMaskTest(SegmentMemory.SegmentPrototype[] smems, PathEndNode endNode)
-
createPathProtoMemories
public static SegmentMemory.SegmentPrototype[] createPathProtoMemories(TerminalNode tn, TerminalNode removingTn, InternalRuleBase rbase)
-
createLeftTupleNodeProtoMemories
public static SegmentMemory.SegmentPrototype[] createLeftTupleNodeProtoMemories(LeftTupleNode lts, TerminalNode removingTn, InternalRuleBase rbase)
-
createSegmentMemory
public static SegmentMemory.SegmentPrototype createSegmentMemory(LeftTupleNode segmentRoot, LeftTupleNode segmentTip, int recordBefore, TerminalNode removingTn, InternalRuleBase rbase)
Initialises the NodeSegment memory for all nodes in the segment.
-
requiresAnEagerSegment
public static boolean requiresAnEagerSegment(int nodeTypesInSegment)
-
nextNodePosMask
public static long nextNodePosMask(long posMask)
-
canBeDisabled
public static boolean canBeDisabled(BetaNode betaNode)
-
isRootNode
public static boolean isRootNode(LeftTupleNode node, TerminalNode ignoreTn)
Returns whether the node is the root of a segment. Lians are always the root of a segment. node cannot be null. The result should discount any removingRule. That means it gives you the result as if the rule had already been removed from the network.
-
isTipNode
public static boolean isTipNode(LeftTupleNode node, TerminalNode removingTN)
Returns whether the node is the tip of a segment. EndNodes (rtn and rian) are always the tip of a segment. node cannot be null. The result should discount any removingRule. That means it gives you the result as if the rule had already been removed from the network.
-
isNonTerminalTipNode
public static boolean isNonTerminalTipNode(LeftTupleNode node, TerminalNode removingTN)
-
sinkNotExclusivelyAssociatedWithTerminal
public static boolean sinkNotExclusivelyAssociatedWithTerminal(TerminalNode removingTN, LeftTupleNode sink)
-
updateNodeTypesMask
public static int updateNodeTypesMask(org.drools.base.common.NetworkNode node, int mask)
-
isSet
public static boolean isSet(int mask, int bit)
-
findSegmentRoot
public static LeftTupleNode findSegmentRoot(LeftTupleNode tupleSource)
-
findSegmentRoot
public static LeftTupleNode findSegmentRoot(LeftTupleNode tupleSource, TerminalNode ignoreTn)
-
isAssociatedWith
public static boolean isAssociatedWith(org.drools.base.common.NetworkNode node, TerminalNode tn)
-
-