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 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[]createPathProtoMemories(LeftTupleNode lts, LeftTupleSource stopNode, TerminalNode removingTn, RuleBase rbase)static voidcreatePathProtoMemories(TerminalNode tn, TerminalNode removingTn, RuleBase rbase)static SegmentMemory.SegmentPrototypecreateSegmentMemory(LeftTupleNode segmentRoot, LeftTupleNode segmentTip, TerminalNode removingTn, RuleBase rbase)Initialises the NodeSegment memory for all nodes in the segment.static LeftTupleNodefindSegmentRoot(LeftTupleNode tupleSource)static booleanisAssociatedWith(NetworkNode node, TerminalNode tn)static booleanisNonTerminalTipNode(LeftTupleNode node, TerminalNode removingTN)static booleanisRootNode(LeftTupleNode node, TerminalNode removingTN)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 nodePosMask)static booleanrequiresAnEagerSegment(int nodeTypesInSegment)static booleansinkNotExclusivelyAssociatedWithTerminal(TerminalNode removingTN, LeftTupleNode sink)static intupdateNodeTypesMask(NetworkNode node, int mask)
-
-
-
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
-
-
Method Detail
-
createPathProtoMemories
public static void createPathProtoMemories(TerminalNode tn, TerminalNode removingTn, RuleBase rbase)
-
createPathProtoMemories
public static SegmentMemory.SegmentPrototype[] createPathProtoMemories(LeftTupleNode lts, LeftTupleSource stopNode, TerminalNode removingTn, RuleBase rbase)
-
createSegmentMemory
public static SegmentMemory.SegmentPrototype createSegmentMemory(LeftTupleNode segmentRoot, LeftTupleNode segmentTip, TerminalNode removingTn, RuleBase rbase)
Initialises the NodeSegment memory for all nodes in the segment.
-
requiresAnEagerSegment
public static boolean requiresAnEagerSegment(int nodeTypesInSegment)
-
nextNodePosMask
public static long nextNodePosMask(long nodePosMask)
-
canBeDisabled
public static boolean canBeDisabled(BetaNode betaNode)
-
isRootNode
public static boolean isRootNode(LeftTupleNode node, TerminalNode removingTN)
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(NetworkNode node, int mask)
-
isSet
public static boolean isSet(int mask, int bit)
-
findSegmentRoot
public static LeftTupleNode findSegmentRoot(LeftTupleNode tupleSource)
-
isAssociatedWith
public static boolean isAssociatedWith(NetworkNode node, TerminalNode tn)
-
-