Class BuildtimeSegmentUtilities

java.lang.Object
org.drools.core.phreak.BuildtimeSegmentUtilities

public class BuildtimeSegmentUtilities extends Object
  • Field Details

  • Constructor Details

    • BuildtimeSegmentUtilities

      public BuildtimeSegmentUtilities()
  • Method Details

    • 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(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(NetworkNode node, TerminalNode tn)