Package org.drools.core.phreak
Class BuildtimeSegmentUtilities
java.lang.Object
org.drools.core.phreak.BuildtimeSegmentUtilities
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanBeDisabled(BetaNode betaNode) static SegmentMemory.SegmentPrototype[]createLeftTupleNodeProtoMemories(LeftTupleNode lts, TerminalNode removingTn, InternalRuleBase rbase) static SegmentMemory.SegmentPrototype[]createPathProtoMemories(TerminalNode tn, TerminalNode removingTn, InternalRuleBase rbase) createSegmentMemory(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(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(NetworkNode node, int mask) static voidupdateSegmentEndNodes(PathEndNode endNode)
-
Field Details
-
NOT_NODE_BIT
public static final int NOT_NODE_BIT- See Also:
-
JOIN_NODE_BIT
public static final int JOIN_NODE_BIT- See Also:
-
REACTIVE_EXISTS_NODE_BIT
public static final int REACTIVE_EXISTS_NODE_BIT- See Also:
-
PASSIVE_EXISTS_NODE_BIT
public static final int PASSIVE_EXISTS_NODE_BIT- See Also:
-
CONDITIONAL_BRANCH_BIT
public static final int CONDITIONAL_BRANCH_BIT- See Also:
-
-
Constructor Details
-
BuildtimeSegmentUtilities
public BuildtimeSegmentUtilities()
-
-
Method Details
-
updateSegmentEndNodes
-
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
-
isRootNode
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
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
-
sinkNotExclusivelyAssociatedWithTerminal
public static boolean sinkNotExclusivelyAssociatedWithTerminal(TerminalNode removingTN, LeftTupleNode sink) -
updateNodeTypesMask
-
isSet
public static boolean isSet(int mask, int bit) -
findSegmentRoot
-
findSegmentRoot
-
isAssociatedWith
-