Package org.drools.core.phreak
Class SegmentUtilities
- java.lang.Object
-
- org.drools.core.phreak.SegmentUtilities
-
public class SegmentUtilities extends Object
-
-
Constructor Summary
Constructors Constructor Description SegmentUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckEagerSegmentCreation(LeftTupleSource lt, ReteEvaluator reteEvaluator, int nodeTypesInSegment)static SegmentMemorycreateChildSegment(ReteEvaluator reteEvaluator, LeftTupleNode node)static SegmentMemorycreateChildSegmentForTerminalNode(LeftTupleNode node, Memory memory)static voidcreateChildSegments(ReteEvaluator reteEvaluator, SegmentMemory smem, LeftTupleSinkPropagator sinkProp)static SegmentMemorycreateSegmentMemory(LeftTupleSource tupleSource, Memory mem, ReteEvaluator reteEvaluator)static voidcreateSegmentMemory(LeftTupleSource tupleSource, ReteEvaluator reteEvaluator)Initialises the NodeSegment memory for all nodes in the segment.static SegmentMemorygetQuerySegmentMemory(ReteEvaluator reteEvaluator, LeftTupleSource segmentRoot, QueryElementNode queryNode)static booleaninSubNetwork(RightInputAdapterNode riaNode, LeftTupleSource leftTupleSource)Is the LeftTupleSource a node in the sub network for the RightInputAdapterNode To be in the same network, it must be a node is after the two output of the parent and before the rianode.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 intupdateNodeTypesMask(NetworkNode node, int mask)
-
-
-
Method Detail
-
createSegmentMemory
public static void createSegmentMemory(LeftTupleSource tupleSource, ReteEvaluator reteEvaluator)
Initialises the NodeSegment memory for all nodes in the segment.
-
createSegmentMemory
public static SegmentMemory createSegmentMemory(LeftTupleSource tupleSource, Memory mem, ReteEvaluator reteEvaluator)
-
getQuerySegmentMemory
public static SegmentMemory getQuerySegmentMemory(ReteEvaluator reteEvaluator, LeftTupleSource segmentRoot, QueryElementNode queryNode)
-
createChildSegments
public static void createChildSegments(ReteEvaluator reteEvaluator, SegmentMemory smem, LeftTupleSinkPropagator sinkProp)
-
createChildSegment
public static SegmentMemory createChildSegment(ReteEvaluator reteEvaluator, LeftTupleNode node)
-
createChildSegmentForTerminalNode
public static SegmentMemory createChildSegmentForTerminalNode(LeftTupleNode node, Memory memory)
-
inSubNetwork
public static boolean inSubNetwork(RightInputAdapterNode riaNode, LeftTupleSource leftTupleSource)
Is the LeftTupleSource a node in the sub network for the RightInputAdapterNode To be in the same network, it must be a node is after the two output of the parent and before the rianode.
-
checkEagerSegmentCreation
public static void checkEagerSegmentCreation(LeftTupleSource lt, ReteEvaluator reteEvaluator, int nodeTypesInSegment)
-
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)
-
updateNodeTypesMask
public static int updateNodeTypesMask(NetworkNode node, int mask)
-
isSet
public static boolean isSet(int mask, int bit)
-
-